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

Unified Diff: components/autofill/core/browser/autofill_test_utils.cc

Issue 964563002: Replace SetAuthenticatedUsername with SetAuthenticatedAccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@priv
Patch Set: rebased Created 5 years, 8 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: components/autofill/core/browser/autofill_test_utils.cc
diff --git a/components/autofill/core/browser/autofill_test_utils.cc b/components/autofill/core/browser/autofill_test_utils.cc
index 922eff7357fc0b503782ce8c0ba6c0962966fd4c..c69611a46711a272b5a1f8b747db88b8163849c0 100644
--- a/components/autofill/core/browser/autofill_test_utils.cc
+++ b/components/autofill/core/browser/autofill_test_utils.cc
@@ -19,6 +19,7 @@
#include "components/autofill/core/common/form_field_data.h"
#include "components/os_crypt/os_crypt.h"
#include "components/pref_registry/pref_registry_syncable.h"
+#include "components/signin/core/browser/account_tracker_service.h"
#include "components/signin/core/common/signin_pref_names.h"
using base::ASCIIToUTF16;
@@ -40,8 +41,19 @@ scoped_ptr<PrefService> PrefServiceForTesting() {
// PDM depends on this pref, which is normally registered in
// SigninManagerFactory.
registry->RegisterStringPref(
- ::prefs::kGoogleServicesUsername, std::string(),
+ ::prefs::kGoogleServicesAccountId, std::string(),
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+
+ // PDM depends on these prefs, which are normally registered in
+ // AccountTrackerServiceFactory.
+ registry->RegisterListPref(
+ AccountTrackerService::kAccountInfoPref,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterIntegerPref(
+ ::prefs::kAccountIdMigrationState,
+ AccountTrackerService::MIGRATION_NOT_STARTED,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+
base::PrefServiceFactory factory;
factory.set_user_prefs(make_scoped_refptr(new TestingPrefStore()));
return factory.Create(registry.get());

Powered by Google App Engine
This is Rietveld 408576698