diff options
author | Luis Hector Chavez <lhchavez@google.com> | 2016-06-01 22:33:03 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-06-01 22:33:03 +0000 |
commit | 8c3161437cc2a8ee83cb40aecbfb70c98eec87b9 (patch) | |
tree | 7b07a733454f81b52e0df79be218de9284c58c32 | |
parent | 89a2fee565b580de78a0dad0656d11d5bb14b4ea (diff) | |
parent | 5cb40d6f2bac0fb5f6d349f8e9fa965288fba551 (diff) | |
download | shill-8c3161437cc2a8ee83cb40aecbfb70c98eec87b9.tar.gz |
shill: Update libchrome APIs to r395517 am: f37f8cf4ab
am: 5cb40d6f2b
* commit '5cb40d6f2bac0fb5f6d349f8e9fa965288fba551':
shill: Update libchrome APIs to r395517
Change-Id: Id3e8bbfa1d5f644f48b2131e5b136582b423c6db
-rw-r--r-- | dbus/chromeos_manager_dbus_adaptor_unittest.cc | 6 | ||||
-rw-r--r-- | dbus/chromeos_third_party_vpn_dbus_adaptor.h | 2 | ||||
-rw-r--r-- | json_store.cc | 20 | ||||
-rw-r--r-- | vpn/third_party_vpn_driver.h | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/dbus/chromeos_manager_dbus_adaptor_unittest.cc b/dbus/chromeos_manager_dbus_adaptor_unittest.cc index 945786aa..8d821b5d 100644 --- a/dbus/chromeos_manager_dbus_adaptor_unittest.cc +++ b/dbus/chromeos_manager_dbus_adaptor_unittest.cc @@ -86,7 +86,7 @@ TEST_F(ChromeosManagerDBusAdaptorTest, ClaimInterface) { string kDefaultClaimerName = ""; string kNonDefaultClaimerName = "test_claimer"; string kInterfaceName = "test_interface"; - scoped_ptr<Response> message(Response::CreateEmpty()); + std::unique_ptr<Response> message(Response::CreateEmpty()); // Watcher for device claimer is not created when we fail to claim the device. EXPECT_EQ(nullptr, manager_adaptor_.watcher_for_device_claimer_.get()); @@ -125,7 +125,7 @@ TEST_F(ChromeosManagerDBusAdaptorTest, ReleaseInterface) { brillo::ErrorPtr error; string kClaimerName = "test_claimer"; string kInterfaceName = "test_interface"; - scoped_ptr<Response> message(Response::CreateEmpty()); + std::unique_ptr<Response> message(Response::CreateEmpty()); // Setup watcher for device claimer. manager_adaptor_.watcher_for_device_claimer_.reset( @@ -150,7 +150,7 @@ TEST_F(ChromeosManagerDBusAdaptorTest, ReleaseInterface) { TEST_F(ChromeosManagerDBusAdaptorTest, SetupApModeInterface) { brillo::ErrorPtr error; string out_interface_name; - scoped_ptr<Response> message(Response::CreateEmpty()); + std::unique_ptr<Response> message(Response::CreateEmpty()); #if !defined(DISABLE_WIFI) && defined(__BRILLO__) // Watcher for AP mode setter is not created when we fail to setup AP mode diff --git a/dbus/chromeos_third_party_vpn_dbus_adaptor.h b/dbus/chromeos_third_party_vpn_dbus_adaptor.h index 122199cc..9e128386 100644 --- a/dbus/chromeos_third_party_vpn_dbus_adaptor.h +++ b/dbus/chromeos_third_party_vpn_dbus_adaptor.h @@ -22,7 +22,7 @@ #include <vector> #include <base/callback.h> -#include <base/memory/scoped_ptr.h> +#include <base/memory/ref_counted.h> #include "dbus_bindings/org.chromium.flimflam.ThirdPartyVpn.h" #include "shill/adaptor_interfaces.h" diff --git a/json_store.cc b/json_store.cc index 73d1bbf8..f770c199 100644 --- a/json_store.cc +++ b/json_store.cc @@ -30,7 +30,7 @@ #include <base/files/important_file_writer.h> #include <base/files/file_util.h> #include <base/json/json_string_value_serializer.h> -#include <base/memory/scoped_ptr.h> +#include <base/memory/ptr_util.h> #include <base/strings/string_number_conversions.h> #include <base/strings/string_util.h> #include <base/strings/stringprintf.h> @@ -269,9 +269,9 @@ ConvertDictionaryValueToVariantDictionary( // Serialization helpers. -scoped_ptr<base::DictionaryValue> MakeCoercedValue( +std::unique_ptr<base::DictionaryValue> MakeCoercedValue( const string& native_type, const string& encoded_value) { - auto coerced_value(make_scoped_ptr(new base::DictionaryValue())); + auto coerced_value = base::MakeUnique<base::DictionaryValue>(); coerced_value->SetStringWithoutPathExpansion( kCoercedValuePropertyNativeType, native_type); coerced_value->SetStringWithoutPathExpansion( @@ -279,7 +279,7 @@ scoped_ptr<base::DictionaryValue> MakeCoercedValue( return coerced_value; } -scoped_ptr<base::Value> MakeValueForString(const string& native_string) { +std::unique_ptr<base::Value> MakeValueForString(const string& native_string) { // Strictly speaking, we don't need to escape non-ASCII text, if // that text is UTF-8. Practically speaking, however, it'll be // easier to inspect config files if all non-ASCII strings are @@ -287,7 +287,7 @@ scoped_ptr<base::Value> MakeValueForString(const string& native_string) { // similar-looking glyphs.) if (base::IsStringASCII(native_string) && native_string.find('\0') == string::npos) { - return make_scoped_ptr(new base::StringValue(native_string)); + return base::MakeUnique<base::StringValue>(native_string); } else { const string hex_encoded_string( base::HexEncode(native_string.data(), native_string.size())); @@ -295,9 +295,9 @@ scoped_ptr<base::Value> MakeValueForString(const string& native_string) { } } -scoped_ptr<base::DictionaryValue> ConvertVariantDictionaryToDictionaryValue( +std::unique_ptr<base::DictionaryValue> ConvertVariantDictionaryToDictionaryValue( const brillo::VariantDictionary& variant_dictionary) { - auto dictionary_value(make_scoped_ptr(new base::DictionaryValue())); + auto dictionary_value = base::MakeUnique<base::DictionaryValue>(); for (const auto& key_and_value : variant_dictionary) { const auto& key = key_and_value.first; const auto& value = key_and_value.second; @@ -314,7 +314,7 @@ scoped_ptr<base::DictionaryValue> ConvertVariantDictionaryToDictionaryValue( dictionary_value->SetWithoutPathExpansion( key, MakeCoercedValue(kNativeTypeUint64, encoded_value)); } else if (value.IsTypeCompatible<vector<string>>()) { - auto list_value(make_scoped_ptr(new base::ListValue())); + auto list_value = base::MakeUnique<base::ListValue>(); for (const auto& string_list_item : value.Get<vector<string>>()) { list_value->Append(MakeValueForString(string_list_item)); } @@ -425,10 +425,10 @@ bool JsonStore::Close() { } bool JsonStore::Flush() { - auto groups(make_scoped_ptr(new base::DictionaryValue())); + auto groups = base::MakeUnique<base::DictionaryValue>(); for (const auto& group_name_and_settings : group_name_to_settings_) { const auto& group_name = group_name_and_settings.first; - scoped_ptr<base::DictionaryValue> group_settings( + std::unique_ptr<base::DictionaryValue> group_settings( ConvertVariantDictionaryToDictionaryValue( group_name_and_settings.second)); if (!group_settings) { diff --git a/vpn/third_party_vpn_driver.h b/vpn/third_party_vpn_driver.h index d6e9bd82..a0ea9ddf 100644 --- a/vpn/third_party_vpn_driver.h +++ b/vpn/third_party_vpn_driver.h @@ -18,12 +18,12 @@ #define SHILL_VPN_THIRD_PARTY_VPN_DRIVER_H_ #include <map> +#include <memory> #include <set> #include <string> #include <vector> #include <base/callback.h> -#include <base/memory/scoped_ptr.h> #include <gtest/gtest_prod.h> #include "shill/ipconfig.h" |