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

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

Issue 2705113005: Update AutoImport to import nothing by default (in absence of policy and master_prefs). (Closed)
Patch Set: review:grt#7 Created 3 years, 10 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/profile_pref_store_manager_unittest.cc
diff --git a/chrome/browser/prefs/profile_pref_store_manager_unittest.cc b/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
index 45230ca0d11391be210cecf9bfff67f96303712e..81ff412b743f67a958549203de5a9b2762dd319c 100644
--- a/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
+++ b/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
@@ -7,6 +7,7 @@
#include <stddef.h>
#include <memory>
+#include <utility>
#include <vector>
#include "base/compiler_specific.h"
@@ -319,10 +320,12 @@ TEST_F(ProfilePrefStoreManagerTest, ProtectValues) {
}
TEST_F(ProfilePrefStoreManagerTest, InitializePrefsFromMasterPrefs) {
- base::DictionaryValue master_prefs;
- master_prefs.Set(kTrackedAtomic, new base::StringValue(kFoobar));
- master_prefs.Set(kProtectedAtomic, new base::StringValue(kHelloWorld));
- EXPECT_TRUE(manager_->InitializePrefsFromMasterPrefs(master_prefs));
+ std::unique_ptr<base::DictionaryValue> master_prefs =
grt (UTC plus 2) 2017/02/23 21:19:01 auto here, too
gab 2017/02/23 23:27:53 Done.
+ base::MakeUnique<base::DictionaryValue>();
+ master_prefs->Set(kTrackedAtomic, new base::StringValue(kFoobar));
+ master_prefs->Set(kProtectedAtomic, new base::StringValue(kHelloWorld));
+ EXPECT_TRUE(
+ manager_->InitializePrefsFromMasterPrefs(std::move(master_prefs)));
LoadExistingPrefs();

Powered by Google App Engine
This is Rietveld 408576698