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

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

Issue 1662523004: Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_experiments.h" 5 #include "components/autofill/core/browser/autofill_experiments.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
11 #include "build/build_config.h" 10 #include "build/build_config.h"
12 #include "components/autofill/core/common/autofill_pref_names.h" 11 #include "components/autofill/core/common/autofill_pref_names.h"
13 #include "components/autofill/core/common/autofill_switches.h" 12 #include "components/autofill/core/common/autofill_switches.h"
13 #include "components/prefs/pref_service.h"
14 #include "components/sync_driver/sync_service.h" 14 #include "components/sync_driver/sync_service.h"
15 #include "google_apis/gaia/gaia_auth_util.h" 15 #include "google_apis/gaia/gaia_auth_util.h"
16 16
17 namespace autofill { 17 namespace autofill {
18 18
19 bool IsAutofillEnabled(const PrefService* pref_service) { 19 bool IsAutofillEnabled(const PrefService* pref_service) {
20 return pref_service->GetBoolean(prefs::kAutofillEnabled); 20 return pref_service->GetBoolean(prefs::kAutofillEnabled);
21 } 21 }
22 22
23 bool IsInAutofillSuggestionsDisabledExperiment() { 23 bool IsInAutofillSuggestionsDisabledExperiment() {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 98 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
99 switches::kDisableOfferUploadCreditCards)) { 99 switches::kDisableOfferUploadCreditCards)) {
100 return false; 100 return false;
101 } 101 }
102 102
103 return !group_name.empty() && group_name != "Disabled"; 103 return !group_name.empty() && group_name != "Disabled";
104 } 104 }
105 105
106 } // namespace autofill 106 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698