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

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

Issue 1913373002: Revert "Refactor ProfileInfoCache in most of c/b/profiles" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 146
147 web_ui()->CallJavascriptFunction("cr.webUIListenerCallback", 147 web_ui()->CallJavascriptFunction("cr.webUIListenerCallback",
148 base::StringValue("profile-icons-received"), 148 base::StringValue("profile-icons-received"),
149 image_url_list); 149 image_url_list);
150 150
151 SendNewProfileDefaults(); 151 SendNewProfileDefaults();
152 } 152 }
153 153
154 void SigninCreateProfileHandler::SendNewProfileDefaults() { 154 void SigninCreateProfileHandler::SendNewProfileDefaults() {
155 ProfileAttributesStorage& storage = 155 ProfileInfoCache& cache =
156 g_browser_process->profile_manager()->GetProfileAttributesStorage(); 156 g_browser_process->profile_manager()->GetProfileInfoCache();
157 base::DictionaryValue profile_info; 157 base::DictionaryValue profile_info;
158 profile_info.SetString("name", storage.ChooseNameForNewProfile(0)); 158 profile_info.SetString("name", cache.ChooseNameForNewProfile(0));
159 159
160 web_ui()->CallJavascriptFunction( 160 web_ui()->CallJavascriptFunction(
161 "cr.webUIListenerCallback", 161 "cr.webUIListenerCallback",
162 base::StringValue("profile-defaults-received"), 162 base::StringValue("profile-defaults-received"),
163 profile_info); 163 profile_info);
164 } 164 }
165 165
166 void SigninCreateProfileHandler::RequestSignedInProfiles( 166 void SigninCreateProfileHandler::RequestSignedInProfiles(
167 const base::ListValue* args) { 167 const base::ListValue* args) {
168 base::ListValue user_info_list; 168 base::ListValue user_info_list;
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 DCHECK_EQ(SUPERVISED_PROFILE_IMPORT, profile_creation_type_); 685 DCHECK_EQ(SUPERVISED_PROFILE_IMPORT, profile_creation_type_);
686 UMA_HISTOGRAM_ENUMERATION("Profile.SupervisedProfileImportError", 686 UMA_HISTOGRAM_ENUMERATION("Profile.SupervisedProfileImportError",
687 error_state, GoogleServiceAuthError::NUM_STATES); 687 error_state, GoogleServiceAuthError::NUM_STATES);
688 UMA_HISTOGRAM_MEDIUM_TIMES( 688 UMA_HISTOGRAM_MEDIUM_TIMES(
689 "Profile.SupervisedProfileTotalImportTime", 689 "Profile.SupervisedProfileTotalImportTime",
690 base::TimeTicks::Now() - profile_creation_start_time_); 690 base::TimeTicks::Now() - profile_creation_start_time_);
691 } 691 }
692 } 692 }
693 693
694 #endif 694 #endif
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profiles_state.cc ('k') | chrome/browser/ui/webui/signin/signin_create_profile_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698