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

Side by Side Diff: chrome/browser/ui/webui/signin/signin_create_profile_handler.cc

Issue 1794353003: Refactor ProfileInfoCache in c/b/profiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replaced LOG(WARNING) by UMA histograms Created 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/ui/webui/signin/signin_create_profile_handler.h" 5 #include "chrome/browser/ui/webui/signin/signin_create_profile_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 142
143 web_ui()->CallJavascriptFunction("cr.webUIListenerCallback", 143 web_ui()->CallJavascriptFunction("cr.webUIListenerCallback",
144 base::StringValue("profile-icons-received"), 144 base::StringValue("profile-icons-received"),
145 image_url_list); 145 image_url_list);
146 146
147 SendNewProfileDefaults(); 147 SendNewProfileDefaults();
148 } 148 }
149 149
150 void SigninCreateProfileHandler::SendNewProfileDefaults() { 150 void SigninCreateProfileHandler::SendNewProfileDefaults() {
151 ProfileInfoCache& cache = 151 ProfileAttributesStorage& storage =
152 g_browser_process->profile_manager()->GetProfileInfoCache(); 152 g_browser_process->profile_manager()->GetProfileAttributesStorage();
153 base::DictionaryValue profile_info; 153 base::DictionaryValue profile_info;
154 profile_info.SetString("name", cache.ChooseNameForNewProfile(0)); 154 profile_info.SetString("name", storage.ChooseNameForNewProfile(0));
155 155
156 web_ui()->CallJavascriptFunction( 156 web_ui()->CallJavascriptFunction(
157 "cr.webUIListenerCallback", 157 "cr.webUIListenerCallback",
158 base::StringValue("profile-defaults-received"), 158 base::StringValue("profile-defaults-received"),
159 profile_info); 159 profile_info);
160 } 160 }
161 161
162 void SigninCreateProfileHandler::RequestSignedInProfiles( 162 void SigninCreateProfileHandler::RequestSignedInProfiles(
163 const base::ListValue* args) { 163 const base::ListValue* args) {
164 base::ListValue user_info_list; 164 base::ListValue user_info_list;
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 DCHECK_EQ(SUPERVISED_PROFILE_IMPORT, profile_creation_type_); 676 DCHECK_EQ(SUPERVISED_PROFILE_IMPORT, profile_creation_type_);
677 UMA_HISTOGRAM_ENUMERATION("Profile.SupervisedProfileImportError", 677 UMA_HISTOGRAM_ENUMERATION("Profile.SupervisedProfileImportError",
678 error_state, GoogleServiceAuthError::NUM_STATES); 678 error_state, GoogleServiceAuthError::NUM_STATES);
679 UMA_HISTOGRAM_MEDIUM_TIMES( 679 UMA_HISTOGRAM_MEDIUM_TIMES(
680 "Profile.SupervisedProfileTotalImportTime", 680 "Profile.SupervisedProfileTotalImportTime",
681 base::TimeTicks::Now() - profile_creation_start_time_); 681 base::TimeTicks::Now() - profile_creation_start_time_);
682 } 682 }
683 } 683 }
684 684
685 #endif 685 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698