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

Unified Diff: chrome/browser/prefs/chrome_command_line_pref_store_unittest.cc

Issue 2785883003: Use unique_ptr<DictionaryValue> in ProxyConfigDictionary (Closed)
Patch Set: Fix compilation 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/prefs/chrome_command_line_pref_store_unittest.cc
diff --git a/chrome/browser/prefs/chrome_command_line_pref_store_unittest.cc b/chrome/browser/prefs/chrome_command_line_pref_store_unittest.cc
index 50547cffee6a0b62f2d3c8f7fb1f7808147d351f..524477104815ae8f0f60f6a4e81a12efd3cc17d7 100644
--- a/chrome/browser/prefs/chrome_command_line_pref_store_unittest.cc
+++ b/chrome/browser/prefs/chrome_command_line_pref_store_unittest.cc
@@ -39,7 +39,7 @@ class TestCommandLinePrefStore : public ChromeCommandLinePrefStore {
ASSERT_TRUE(GetValue(proxy_config::prefs::kProxy, &value));
ASSERT_EQ(base::Value::Type::DICTIONARY, value->GetType());
ProxyConfigDictionary dict(
- static_cast<const base::DictionaryValue*>(value));
+ static_cast<const base::DictionaryValue*>(value)->CreateDeepCopy());
ProxyPrefs::ProxyMode actual_mode;
ASSERT_TRUE(dict.GetMode(&actual_mode));
EXPECT_EQ(expected_mode, actual_mode);
@@ -122,7 +122,8 @@ TEST(ChromeCommandLinePrefStoreTest, MultipleSwitches) {
const base::Value* value = NULL;
ASSERT_TRUE(store->GetValue(proxy_config::prefs::kProxy, &value));
ASSERT_EQ(base::Value::Type::DICTIONARY, value->GetType());
- ProxyConfigDictionary dict(static_cast<const base::DictionaryValue*>(value));
+ ProxyConfigDictionary dict(
+ static_cast<const base::DictionaryValue*>(value)->CreateDeepCopy());
std::string string_result;

Powered by Google App Engine
This is Rietveld 408576698