Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/wallpaper_manager.h" | 5 #include "chrome/browser/chromeos/login/wallpaper_manager.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 237 bool disable_new_oobe = CommandLine::ForCurrentProcess()-> | 237 bool disable_new_oobe = CommandLine::ForCurrentProcess()-> |
| 238 HasSwitch(switches::kDisableNewOobe); | 238 HasSwitch(switches::kDisableNewOobe); |
| 239 bool disable_boot_animation = CommandLine::ForCurrentProcess()-> | 239 bool disable_boot_animation = CommandLine::ForCurrentProcess()-> |
| 240 HasSwitch(switches::kDisableBootAnimation); | 240 HasSwitch(switches::kDisableBootAnimation); |
| 241 | 241 |
| 242 if (!user_manager->IsUserLoggedIn()) { | 242 if (!user_manager->IsUserLoggedIn()) { |
| 243 if (!disable_new_oobe) { | 243 if (!disable_new_oobe) { |
| 244 if (!WizardController::IsDeviceRegistered()) { | 244 if (!WizardController::IsDeviceRegistered()) { |
| 245 SetDefaultWallpaper(); | 245 SetDefaultWallpaper(); |
| 246 } else { | 246 } else { |
| 247 if (CrosSettingsProvider::TRUSTED != | |
| 248 CrosSettings::Get()->PrepareTrustedValues( | |
| 249 base::Bind(&WallpaperManager::InitializeWallpaper, | |
| 250 base::Unretained(this)))) { | |
| 251 return; | |
| 252 } | |
|
Mattias Nissler (ping if slow)
2012/12/04 09:31:18
should this be moved to the top of the function? O
bartfab (slow)
2012/12/04 09:59:39
You will also run into trouble when settings are p
bshe
2012/12/04 18:32:37
I see. How often does the PERMANENTLY_UNTRUSTED si
bshe
2012/12/04 18:32:37
Some of the code path is not depend on the setting
bshe
2012/12/05 14:58:36
bartfab@ Sorry. Please ignore my comment about Ret
| |
| 247 bool show_users = true; | 253 bool show_users = true; |
| 248 bool result = CrosSettings::Get()->GetBoolean( | 254 bool result = CrosSettings::Get()->GetBoolean( |
| 249 kAccountsPrefShowUserNamesOnSignIn, &show_users); | 255 kAccountsPrefShowUserNamesOnSignIn, &show_users); |
| 250 DCHECK(result) << "Unable to fetch setting " | 256 DCHECK(result) << "Unable to fetch setting " |
| 251 << kAccountsPrefShowUserNamesOnSignIn; | 257 << kAccountsPrefShowUserNamesOnSignIn; |
| 252 const chromeos::UserList& users = user_manager->GetUsers(); | 258 const chromeos::UserList& users = user_manager->GetUsers(); |
| 253 if (!show_users || users.empty()) { | 259 if (!show_users || users.empty()) { |
| 254 // Boot into sign in form, preload default wallpaper. | 260 // Boot into sign in form, preload default wallpaper. |
| 255 SetDefaultWallpaper(); | 261 SetDefaultWallpaper(); |
| 256 return; | 262 return; |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 951 FROM_HERE, | 957 FROM_HERE, |
| 952 base::Bind(&WallpaperManager::StartLoad, | 958 base::Bind(&WallpaperManager::StartLoad, |
| 953 base::Unretained(this), | 959 base::Unretained(this), |
| 954 email, | 960 email, |
| 955 info, | 961 info, |
| 956 update_wallpaper, | 962 update_wallpaper, |
| 957 valid_path)); | 963 valid_path)); |
| 958 } | 964 } |
| 959 | 965 |
| 960 } // chromeos | 966 } // chromeos |
| OLD | NEW |