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

Side by Side Diff: components/autofill/core/browser/autofill_test_utils.cc

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/autofill/core/browser/autofill_test_utils.h" 5 #include "components/autofill/core/browser/autofill_test_utils.h"
6 6
7 #include "base/guid.h" 7 #include "base/guid.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/prefs/pref_service_factory.h" 9 #include "base/prefs/pref_service_factory.h"
10 #include "base/prefs/testing_pref_store.h" 10 #include "base/prefs/testing_pref_store.h"
(...skipping 22 matching lines...) Expand all
33 33
34 } // namespace 34 } // namespace
35 35
36 scoped_ptr<PrefService> PrefServiceForTesting() { 36 scoped_ptr<PrefService> PrefServiceForTesting() {
37 scoped_refptr<user_prefs::PrefRegistrySyncable> registry( 37 scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
38 new user_prefs::PrefRegistrySyncable()); 38 new user_prefs::PrefRegistrySyncable());
39 AutofillManager::RegisterProfilePrefs(registry.get()); 39 AutofillManager::RegisterProfilePrefs(registry.get());
40 40
41 // PDM depends on this pref, which is normally registered in 41 // PDM depends on this pref, which is normally registered in
42 // SigninManagerFactory. 42 // SigninManagerFactory.
43 registry->RegisterStringPref( 43 registry->RegisterStringPref(::prefs::kGoogleServicesAccountId,
44 ::prefs::kGoogleServicesAccountId, std::string(), 44 std::string());
45 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
46 45
47 // PDM depends on these prefs, which are normally registered in 46 // PDM depends on these prefs, which are normally registered in
48 // AccountTrackerServiceFactory. 47 // AccountTrackerServiceFactory.
49 registry->RegisterListPref( 48 registry->RegisterListPref(AccountTrackerService::kAccountInfoPref);
50 AccountTrackerService::kAccountInfoPref, 49 registry->RegisterIntegerPref(::prefs::kAccountIdMigrationState,
51 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 50 AccountTrackerService::MIGRATION_NOT_STARTED);
52 registry->RegisterIntegerPref(
53 ::prefs::kAccountIdMigrationState,
54 AccountTrackerService::MIGRATION_NOT_STARTED,
55 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
56 51
57 base::PrefServiceFactory factory; 52 base::PrefServiceFactory factory;
58 factory.set_user_prefs(make_scoped_refptr(new TestingPrefStore())); 53 factory.set_user_prefs(make_scoped_refptr(new TestingPrefStore()));
59 return factory.Create(registry.get()); 54 return factory.Create(registry.get());
60 } 55 }
61 56
62 void CreateTestFormField(const char* label, 57 void CreateTestFormField(const char* label,
63 const char* name, 58 const char* name,
64 const char* value, 59 const char* value,
65 const char* type, 60 const char* type,
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 for (const CreditCard& card : cards) { 305 for (const CreditCard& card : cards) {
311 if (card.record_type() != CreditCard::FULL_SERVER_CARD) 306 if (card.record_type() != CreditCard::FULL_SERVER_CARD)
312 continue; 307 continue;
313 308
314 table->UnmaskServerCreditCard(card, card.number()); 309 table->UnmaskServerCreditCard(card, card.number());
315 } 310 }
316 } 311 }
317 312
318 } // namespace test 313 } // namespace test
319 } // namespace autofill 314 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698