Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: chrome/browser/chromeos/proxy_config_service_impl_unittest.cc

Issue 2782553004: Move TestingPrefService to use unique_ptr<Value> (Closed)
Patch Set: comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
diff --git a/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc b/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
index 71530e96915c353b25cb790e1ad7b88fe3503eb6..bd813c5f9ca08f11ab4981c73d06e530d3818226 100644
--- a/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
+++ b/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
@@ -13,6 +13,7 @@
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
@@ -454,9 +455,9 @@ TEST_F(ProxyConfigServiceImplTest, DynamicPrefsOverride) {
// non-existent network proxy.
SetUserConfigInShill(nullptr);
pref_service_.SetManagedPref(::proxy_config::prefs::kProxy,
- managed_config.DeepCopy());
+ managed_config.CreateDeepCopy());
pref_service_.SetRecommendedPref(::proxy_config::prefs::kProxy,
- recommended_config.DeepCopy());
+ recommended_config.CreateDeepCopy());
net::ProxyConfig actual_config;
SyncGetLatestProxyConfig(&actual_config);
EXPECT_EQ(managed_params.auto_detect, actual_config.auto_detect());
@@ -483,7 +484,7 @@ TEST_F(ProxyConfigServiceImplTest, DynamicPrefsOverride) {
// Managed proxy pref should take effect over network proxy.
pref_service_.SetManagedPref(::proxy_config::prefs::kProxy,
- managed_config.DeepCopy());
+ managed_config.CreateDeepCopy());
SyncGetLatestProxyConfig(&actual_config);
EXPECT_EQ(managed_params.auto_detect, actual_config.auto_detect());
EXPECT_EQ(managed_params.pac_url, actual_config.pac_url());
@@ -523,9 +524,9 @@ TEST_F(ProxyConfigServiceImplTest, SharedEthernetAndUserPolicy) {
network_configs->Append(std::move(ethernet_policy));
profile_prefs_.SetUserPref(::proxy_config::prefs::kUseSharedProxies,
- new base::Value(false));
+ base::MakeUnique<base::Value>(false));
profile_prefs_.SetManagedPref(::onc::prefs::kOpenNetworkConfiguration,
- network_configs.release());
+ std::move(network_configs));
net::ProxyConfig actual_config;
SyncGetLatestProxyConfig(&actual_config);

Powered by Google App Engine
This is Rietveld 408576698