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

Side by Side Diff: chrome/browser/profiles/profile_window.cc

Issue 212603011: Newly created profiles should have the grey silhouette as avatar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove duplicate references to resource for grey avatar. Created 6 years, 9 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 | Annotate | Revision Log
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 "chrome/browser/profiles/profile_window.h" 5 #include "chrome/browser/profiles/profile_window.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/utf_string_conversions.h"
11 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/profiles/profile_manager.h" 14 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
15 #include "chrome/browser/ui/browser_dialogs.h" 16 #include "chrome/browser/ui/browser_dialogs.h"
16 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
17 #include "chrome/common/url_constants.h" 18 #include "chrome/common/url_constants.h"
18 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
19 #include "content/public/browser/user_metrics.h" 20 #include "content/public/browser/user_metrics.h"
20 21
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 desktop_type), 214 desktop_type),
214 base::string16(), 215 base::string16(),
215 base::string16(), 216 base::string16(),
216 std::string()); 217 std::string());
217 ProfileMetrics::LogProfileSwitchUser(ProfileMetrics::SWITCH_PROFILE_GUEST); 218 ProfileMetrics::LogProfileSwitchUser(ProfileMetrics::SWITCH_PROFILE_GUEST);
218 } 219 }
219 220
220 void CreateAndSwitchToNewProfile(chrome::HostDesktopType desktop_type, 221 void CreateAndSwitchToNewProfile(chrome::HostDesktopType desktop_type,
221 ProfileSwitchingDoneCallback callback, 222 ProfileSwitchingDoneCallback callback,
222 ProfileMetrics::ProfileAdd metric) { 223 ProfileMetrics::ProfileAdd metric) {
224 ProfileInfoCache& cache =
225 g_browser_process->profile_manager()->GetProfileInfoCache();
226
223 ProfileManager::CreateMultiProfileAsync( 227 ProfileManager::CreateMultiProfileAsync(
224 base::string16(), 228 cache.ChooseNameForNewProfile(
noms (inactive) 2014/03/27 20:19:32 make a variable that stores the result of GetPlace
Mike Lerman 2014/04/02 17:46:25 Done.
225 base::string16(), 229 ProfileInfoCache::GetPlaceholderAvatarIndex()),
230 base::UTF8ToUTF16(ProfileInfoCache::GetDefaultAvatarIconUrl(
231 ProfileInfoCache::GetPlaceholderAvatarIndex())),
226 base::Bind(&OpenBrowserWindowForProfile, 232 base::Bind(&OpenBrowserWindowForProfile,
227 callback, 233 callback,
228 true, 234 true,
229 true, 235 true,
230 desktop_type), 236 desktop_type),
231 std::string()); 237 std::string());
232 ProfileMetrics::LogProfileAddNewUser(metric); 238 ProfileMetrics::LogProfileAddNewUser(metric);
233 } 239 }
234 240
235 void CloseGuestProfileWindows() { 241 void CloseGuestProfileWindows() {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 290
285 if (tutorial_shown) { 291 if (tutorial_shown) {
286 chrome::ShowUserManager(profile->GetPath()); 292 chrome::ShowUserManager(profile->GetPath());
287 } else { 293 } else {
288 chrome::ShowUserManagerWithTutorial( 294 chrome::ShowUserManagerWithTutorial(
289 profiles::USER_MANAGER_TUTORIAL_OVERVIEW); 295 profiles::USER_MANAGER_TUTORIAL_OVERVIEW);
290 } 296 }
291 } 297 }
292 298
293 } // namespace profiles 299 } // namespace profiles
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698