Index: components/proxy_config/proxy_config_dictionary_unittest.cc |
diff --git a/components/proxy_config/proxy_config_dictionary_unittest.cc b/components/proxy_config/proxy_config_dictionary_unittest.cc |
index 33f5364c14b7160005d3a2c7711033473a920f1c..e7047223aac85e6bf9fba3c8789ff0f357aace29 100644 |
--- a/components/proxy_config/proxy_config_dictionary_unittest.cc |
+++ b/components/proxy_config/proxy_config_dictionary_unittest.cc |
@@ -6,6 +6,7 @@ |
#include <memory> |
#include <string> |
+#include <utility> |
#include "base/values.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -18,9 +19,9 @@ struct ProxyConfigHolder { |
}; |
TEST(ProxyConfigDictionaryTest, CreateDirect) { |
- std::unique_ptr<base::DictionaryValue> dict_value( |
- ProxyConfigDictionary::CreateDirect()); |
- ProxyConfigDictionary dict(dict_value.get()); |
+ std::unique_ptr<base::DictionaryValue> dict_value = |
+ ProxyConfigDictionary::CreateDirect(); |
+ ProxyConfigDictionary dict(std::move(dict_value)); |
ProxyConfigHolder h; |
ASSERT_TRUE(dict.GetMode(&h.mode)); |
@@ -31,9 +32,9 @@ TEST(ProxyConfigDictionaryTest, CreateDirect) { |
} |
TEST(ProxyConfigDictionaryTest, CreateAutoDetect) { |
- std::unique_ptr<base::DictionaryValue> dict_value( |
- ProxyConfigDictionary::CreateAutoDetect()); |
- ProxyConfigDictionary dict(dict_value.get()); |
+ std::unique_ptr<base::DictionaryValue> dict_value = |
+ ProxyConfigDictionary::CreateAutoDetect(); |
+ ProxyConfigDictionary dict(std::move(dict_value)); |
ProxyConfigHolder h; |
ASSERT_TRUE(dict.GetMode(&h.mode)); |
@@ -44,9 +45,9 @@ TEST(ProxyConfigDictionaryTest, CreateAutoDetect) { |
} |
TEST(ProxyConfigDictionaryTest, CreatePacScript) { |
- std::unique_ptr<base::DictionaryValue> dict_value( |
- ProxyConfigDictionary::CreatePacScript("pac", false)); |
- ProxyConfigDictionary dict(dict_value.get()); |
+ std::unique_ptr<base::DictionaryValue> dict_value = |
+ ProxyConfigDictionary::CreatePacScript("pac", false); |
+ ProxyConfigDictionary dict(std::move(dict_value)); |
ProxyConfigHolder h; |
ASSERT_TRUE(dict.GetMode(&h.mode)); |
@@ -58,10 +59,9 @@ TEST(ProxyConfigDictionaryTest, CreatePacScript) { |
} |
TEST(ProxyConfigDictionaryTest, CreateFixedServers) { |
- std::unique_ptr<base::DictionaryValue> dict_value( |
- ProxyConfigDictionary::CreateFixedServers("http://1.2.3.4", |
- "http://foo")); |
- ProxyConfigDictionary dict(dict_value.get()); |
+ std::unique_ptr<base::DictionaryValue> dict_value = |
+ ProxyConfigDictionary::CreateFixedServers("http://1.2.3.4", "http://foo"); |
+ ProxyConfigDictionary dict(std::move(dict_value)); |
ProxyConfigHolder h; |
ASSERT_TRUE(dict.GetMode(&h.mode)); |
@@ -74,9 +74,9 @@ TEST(ProxyConfigDictionaryTest, CreateFixedServers) { |
} |
TEST(ProxyConfigDictionaryTest, CreateSystem) { |
- std::unique_ptr<base::DictionaryValue> dict_value( |
- ProxyConfigDictionary::CreateSystem()); |
- ProxyConfigDictionary dict(dict_value.get()); |
+ std::unique_ptr<base::DictionaryValue> dict_value = |
+ ProxyConfigDictionary::CreateSystem(); |
+ ProxyConfigDictionary dict(std::move(dict_value)); |
ProxyConfigHolder h; |
ASSERT_TRUE(dict.GetMode(&h.mode)); |