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

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

Issue 884843002: Recording in UMA when a user interacted with an address form or a credit card form. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: inlining web_profiles() call Created 5 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 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/personal_data_manager.h" 5 #include "components/autofill/core/browser/personal_data_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <iterator> 9 #include <iterator>
10 10
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 } 1190 }
1191 1191
1192 void PersonalDataManager::EnabledPrefChanged() { 1192 void PersonalDataManager::EnabledPrefChanged() {
1193 default_country_code_.clear(); 1193 default_country_code_.clear();
1194 NotifyPersonalDataChanged(); 1194 NotifyPersonalDataChanged();
1195 } 1195 }
1196 1196
1197 const std::vector<AutofillProfile*>& PersonalDataManager::GetProfiles( 1197 const std::vector<AutofillProfile*>& PersonalDataManager::GetProfiles(
1198 bool record_metrics) const { 1198 bool record_metrics) const {
1199 #if defined(OS_MACOSX) && !defined(OS_IOS) 1199 #if defined(OS_MACOSX) && !defined(OS_IOS)
1200 if (!pref_service_->GetBoolean(prefs::kAutofillUseMacAddressBook)) 1200 bool use_auxiliary_profiles =
1201 return web_profiles(); 1201 pref_service_->GetBoolean(prefs::kAutofillUseMacAddressBook);
1202 #else 1202 #else
1203 if (!pref_service_->GetBoolean(prefs::kAutofillAuxiliaryProfilesEnabled)) 1203 bool use_auxiliary_profiles =
1204 return web_profiles(); 1204 pref_service_->GetBoolean(prefs::kAutofillAuxiliaryProfilesEnabled);
1205 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 1205 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
1206 1206
1207 profiles_.clear(); 1207 profiles_.clear();
1208 1208
1209 // Populates |auxiliary_profiles_|. 1209 // Populates |auxiliary_profiles_|.
1210 LoadAuxiliaryProfiles(record_metrics); 1210 if (use_auxiliary_profiles)
1211 LoadAuxiliaryProfiles(record_metrics);
1211 1212
1212 profiles_.insert(profiles_.end(), web_profiles_.begin(), web_profiles_.end()); 1213 profiles_.insert(profiles_.end(), web_profiles().begin(),
1213 profiles_.insert( 1214 web_profiles().end());
1214 profiles_.end(), auxiliary_profiles_.begin(), auxiliary_profiles_.end()); 1215 if (use_auxiliary_profiles) {
1216 profiles_.insert(
1217 profiles_.end(), auxiliary_profiles_.begin(),
1218 auxiliary_profiles_.end());
1219 }
1215 profiles_.insert( 1220 profiles_.insert(
1216 profiles_.end(), server_profiles_.begin(), server_profiles_.end()); 1221 profiles_.end(), server_profiles_.begin(), server_profiles_.end());
1217 return profiles_; 1222 return profiles_;
1218 } 1223 }
1219 1224
1220 } // namespace autofill 1225 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_metrics_unittest.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698