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

Side by Side Diff: chrome/browser/chromeos/login/user_manager_impl.cc

Issue 10492003: Use a #fefefe solid color wallpaper background before user login for GAIA login flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/login/user_manager_impl.h" 5 #include "chrome/browser/chromeos/login/user_manager_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 NotifyOnLogin(); 351 NotifyOnLogin();
352 } 352 }
353 353
354 void UserManagerImpl::StubUserLoggedIn() { 354 void UserManagerImpl::StubUserLoggedIn() {
355 is_current_user_ephemeral_ = true; 355 is_current_user_ephemeral_ = true;
356 logged_in_user_ = new User(kStubUser, false); 356 logged_in_user_ = new User(kStubUser, false);
357 logged_in_user_->SetImage(GetDefaultImage(kStubDefaultImageIndex), 357 logged_in_user_->SetImage(GetDefaultImage(kStubDefaultImageIndex),
358 kStubDefaultImageIndex); 358 kStubDefaultImageIndex);
359 } 359 }
360 360
361 void UserManagerImpl::SetLoggedInUserWallpaper() { 361 void UserManagerImpl::InitializeWallpaper() {
362 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 362 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
363 363
364 if (!IsUserLoggedIn() || IsLoggedInAsStub()) { 364 if (!IsUserLoggedIn() || IsLoggedInAsStub()) {
Nikita (slow) 2012/06/07 09:40:28 https://chromiumcodereview.appspot.com/10541007/ h
bshe 2012/06/08 15:06:30 right. And only for GAIA login flow, we need to se
365 ash::Shell::GetInstance()->desktop_background_controller()-> 365 ash::Shell::GetInstance()->desktop_background_controller()->
366 SetDefaultWallpaper(ash::GetInvalidWallpaperIndex()); 366 SetDefaultWallpaper(ash::GetInvalidWallpaperIndex());
367 return; 367 return;
368 } 368 }
369 UserSelected(GetLoggedInUser().email()); 369 UserSelected(GetLoggedInUser().email());
370 } 370 }
371 371
372 void UserManagerImpl::UserSelected(const std::string& email) { 372 void UserManagerImpl::UserSelected(const std::string& email) {
373 if (IsKnownUser(email)) { 373 if (IsKnownUser(email)) {
374 User::WallpaperType type; 374 User::WallpaperType type;
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 DictionaryPrefUpdate prefs_wallpapers_update(local_state, 961 DictionaryPrefUpdate prefs_wallpapers_update(local_state,
962 kUserWallpapers); 962 kUserWallpapers);
963 prefs_wallpapers_update->RemoveWithoutPathExpansion(username, NULL); 963 prefs_wallpapers_update->RemoveWithoutPathExpansion(username, NULL);
964 SaveUserWallpaperProperties(username, User::DEFAULT, index); 964 SaveUserWallpaperProperties(username, User::DEFAULT, index);
965 } 965 }
966 } 966 }
967 } 967 }
968 } 968 }
969 } 969 }
970 970
971 void UserManagerImpl::GetLoggedInUserWallpaperProperties( 971 void UserManagerImpl::GetLoggedInUserWallpaperProperties(
Nikita (slow) 2012/06/06 11:27:46 This method is called from: 1. UserManagerImpl::E
972 User::WallpaperType* type, 972 User::WallpaperType* type,
973 int* index) { 973 int* index) {
974 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 974 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
975 975
976 if (!IsUserLoggedIn() || IsLoggedInAsStub()) { 976 if (!IsUserLoggedIn() || IsLoggedInAsStub()) {
977 *type = current_user_wallpaper_type_ = User::DEFAULT; 977 *type = current_user_wallpaper_type_ = User::DEFAULT;
978 *index = current_user_wallpaper_index_ = ash::GetInvalidWallpaperIndex(); 978 *index = current_user_wallpaper_index_ = ash::GetInvalidWallpaperIndex();
979 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNewOobe)) {
Nikita (slow) 2012/06/06 11:27:46 This should be moved to InitializeWallpaper() to m
bshe 2012/06/08 15:06:30 Right. Sorry I was in a hurry. I did check on my a
980 bool show_users;
981 CrosSettings::Get()->GetBoolean(kAccountsPrefShowUserNamesOnSignIn,
982 &show_users);
983 if (!show_users)
984 *index = current_user_wallpaper_index_ = ash::GetSolidColorIndex();
985 }
979 return; 986 return;
980 } 987 }
981 988
982 GetUserWallpaperProperties(GetLoggedInUser().email(), type, index); 989 GetUserWallpaperProperties(GetLoggedInUser().email(), type, index);
983 } 990 }
984 991
985 void UserManagerImpl::SaveLoggedInUserWallpaperProperties( 992 void UserManagerImpl::SaveLoggedInUserWallpaperProperties(
986 User::WallpaperType type, 993 User::WallpaperType type,
987 int index) { 994 int index) {
988 SaveUserWallpaperProperties(GetLoggedInUser().email(), type, index); 995 SaveUserWallpaperProperties(GetLoggedInUser().email(), type, index);
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 BrowserThread::PostTask( 1472 BrowserThread::PostTask(
1466 BrowserThread::FILE, 1473 BrowserThread::FILE,
1467 FROM_HERE, 1474 FROM_HERE,
1468 base::Bind(&UserManagerImpl::DeleteUserImage, 1475 base::Bind(&UserManagerImpl::DeleteUserImage,
1469 base::Unretained(this), 1476 base::Unretained(this),
1470 image_path)); 1477 image_path));
1471 } 1478 }
1472 } 1479 }
1473 1480
1474 } // namespace chromeos 1481 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698