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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc

Issue 14139003: Chrome OS multi-profiles backend and UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move IsMultiProfilesEnabled() out of cros Created 7 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 | 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/ui/webui/chromeos/login/oobe_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 // If we're not doing boot animation then WebUI should trigger 313 // If we're not doing boot animation then WebUI should trigger
314 // wallpaper load on boot. 314 // wallpaper load on boot.
315 if (CommandLine::ForCurrentProcess()->HasSwitch( 315 if (CommandLine::ForCurrentProcess()->HasSwitch(
316 switches::kDisableBootAnimation)) { 316 switches::kDisableBootAnimation)) {
317 localized_strings->SetString("bootIntoWallpaper", "on"); 317 localized_strings->SetString("bootIntoWallpaper", "on");
318 } else { 318 } else {
319 localized_strings->SetString("bootIntoWallpaper", "off"); 319 localized_strings->SetString("bootIntoWallpaper", "off");
320 } 320 }
321 321
322 // OobeUI is used for OOBE/login and lock screen. 322 // TODO(nkostylev): Make sure that only one type of login UI
323 if (BaseLoginDisplayHost::default_host()) 323 // is active at a time.
324 localized_strings->SetString("screenType", "login"); 324 // OobeUI is used for these use cases:
325 else 325 // 1. Out-of-box / login
326 // 2. Lock screen.
327 // 3. Multi-profiles sign in (add user to current session).
328 if (BaseLoginDisplayHost::default_host()) {
329 if (!UserManager::Get()->IsUserLoggedIn())
330 localized_strings->SetString("screenType", "login");
331 else
332 localized_strings->SetString("screenType", "login-add-user");
333 } else {
326 localized_strings->SetString("screenType", "lock"); 334 localized_strings->SetString("screenType", "lock");
335 }
327 } 336 }
328 337
329 void OobeUI::InitializeScreenMaps() { 338 void OobeUI::InitializeScreenMaps() {
330 screen_names_.resize(SCREEN_UNKNOWN); 339 screen_names_.resize(SCREEN_UNKNOWN);
331 screen_names_[SCREEN_OOBE_NETWORK] = kScreenOobeNetwork; 340 screen_names_[SCREEN_OOBE_NETWORK] = kScreenOobeNetwork;
332 screen_names_[SCREEN_OOBE_EULA] = kScreenOobeEula; 341 screen_names_[SCREEN_OOBE_EULA] = kScreenOobeEula;
333 screen_names_[SCREEN_OOBE_UPDATE] = kScreenOobeUpdate; 342 screen_names_[SCREEN_OOBE_UPDATE] = kScreenOobeUpdate;
334 screen_names_[SCREEN_OOBE_ENROLLMENT] = kScreenOobeEnrollment; 343 screen_names_[SCREEN_OOBE_ENROLLMENT] = kScreenOobeEnrollment;
335 screen_names_[SCREEN_GAIA_SIGNIN] = kScreenGaiaSignin; 344 screen_names_[SCREEN_GAIA_SIGNIN] = kScreenGaiaSignin;
336 screen_names_[SCREEN_ACCOUNT_PICKER] = kScreenAccountPicker; 345 screen_names_[SCREEN_ACCOUNT_PICKER] = kScreenAccountPicker;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 void OobeUI::OnCurrentScreenChanged(const std::string& screen) { 397 void OobeUI::OnCurrentScreenChanged(const std::string& screen) {
389 if (screen_ids_.count(screen)) { 398 if (screen_ids_.count(screen)) {
390 current_screen_ = screen_ids_[screen]; 399 current_screen_ = screen_ids_[screen];
391 } else { 400 } else {
392 NOTREACHED() << "Screen should be registered in InitializeScreenMaps()"; 401 NOTREACHED() << "Screen should be registered in InitializeScreenMaps()";
393 current_screen_ = SCREEN_UNKNOWN; 402 current_screen_ = SCREEN_UNKNOWN;
394 } 403 }
395 } 404 }
396 405
397 } // namespace chromeos 406 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.cc ('k') | chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698