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/base_login_display_host.h" | 5 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 22 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 23 #include "chrome/browser/chromeos/login/helper.h" | 23 #include "chrome/browser/chromeos/login/helper.h" |
| 24 #include "chrome/browser/chromeos/login/language_switch_menu.h" | 24 #include "chrome/browser/chromeos/login/language_switch_menu.h" |
| 25 #include "chrome/browser/chromeos/login/login_utils.h" | 25 #include "chrome/browser/chromeos/login/login_utils.h" |
| 26 #include "chrome/browser/chromeos/login/login_wizard.h" | 26 #include "chrome/browser/chromeos/login/login_wizard.h" |
| 27 #include "chrome/browser/chromeos/login/user_manager.h" | 27 #include "chrome/browser/chromeos/login/user_manager.h" |
| 28 #include "chrome/browser/chromeos/login/webui_login_display_host.h" | 28 #include "chrome/browser/chromeos/login/webui_login_display_host.h" |
| 29 #include "chrome/browser/chromeos/login/wizard_controller.h" | 29 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 30 #include "chrome/browser/chromeos/mobile_config.h" | 30 #include "chrome/browser/chromeos/mobile_config.h" |
| 31 #include "chrome/browser/chromeos/system/timezone_settings.h" | 31 #include "chrome/browser/chromeos/system/timezone_settings.h" |
| 32 #include "chrome/browser/metrics/variations/variations_service.h" | |
|
SteveT
2012/09/06 19:52:20
Note that we add this header here because otherwis
| |
| 32 #include "chrome/browser/policy/auto_enrollment_client.h" | 33 #include "chrome/browser/policy/auto_enrollment_client.h" |
| 33 #include "chrome/browser/policy/browser_policy_connector.h" | 34 #include "chrome/browser/policy/browser_policy_connector.h" |
| 34 #include "chrome/browser/prefs/pref_service.h" | 35 #include "chrome/browser/prefs/pref_service.h" |
| 35 #include "chrome/common/chrome_notification_types.h" | 36 #include "chrome/common/chrome_notification_types.h" |
| 36 #include "chrome/common/chrome_switches.h" | 37 #include "chrome/common/chrome_switches.h" |
| 37 #include "chrome/common/pref_names.h" | 38 #include "chrome/common/pref_names.h" |
| 38 #include "chromeos/dbus/dbus_thread_manager.h" | 39 #include "chromeos/dbus/dbus_thread_manager.h" |
| 39 #include "chromeos/dbus/session_manager_client.h" | 40 #include "chromeos/dbus/session_manager_client.h" |
| 40 #include "content/public/browser/notification_service.h" | 41 #include "content/public/browser/notification_service.h" |
| 41 #include "content/public/browser/notification_types.h" | 42 #include "content/public/browser/notification_types.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 189 const std::string& first_screen_name, | 190 const std::string& first_screen_name, |
| 190 DictionaryValue* screen_parameters) { | 191 DictionaryValue* screen_parameters) { |
| 191 DVLOG(1) << "Starting wizard, first_screen_name: " << first_screen_name; | 192 DVLOG(1) << "Starting wizard, first_screen_name: " << first_screen_name; |
| 192 // Create and show the wizard. | 193 // Create and show the wizard. |
| 193 // Note, dtor of the old WizardController should be called before ctor of the | 194 // Note, dtor of the old WizardController should be called before ctor of the |
| 194 // new one, because "default_controller()" is updated there. So pure "reset()" | 195 // new one, because "default_controller()" is updated there. So pure "reset()" |
| 195 // is done before new controller creation. | 196 // is done before new controller creation. |
| 196 wizard_controller_.reset(); | 197 wizard_controller_.reset(); |
| 197 wizard_controller_.reset(CreateWizardController()); | 198 wizard_controller_.reset(CreateWizardController()); |
| 198 | 199 |
| 200 // The VariationsService needs to be notified by the controller. The service | |
| 201 // will remove itself as an observer when notified. | |
| 202 wizard_controller_->AddObserver(g_browser_process->variations_service()); | |
| 203 | |
| 199 oobe_progress_bar_visible_ = !WizardController::IsDeviceRegistered(); | 204 oobe_progress_bar_visible_ = !WizardController::IsDeviceRegistered(); |
| 200 SetOobeProgressBarVisible(oobe_progress_bar_visible_); | 205 SetOobeProgressBarVisible(oobe_progress_bar_visible_); |
| 201 wizard_controller_->Init(first_screen_name, screen_parameters); | 206 wizard_controller_->Init(first_screen_name, screen_parameters); |
| 202 } | 207 } |
| 203 | 208 |
| 204 void BaseLoginDisplayHost::StartSignInScreen() { | 209 void BaseLoginDisplayHost::StartSignInScreen() { |
| 205 DVLOG(1) << "Starting sign in screen"; | 210 DVLOG(1) << "Starting sign in screen"; |
| 206 const chromeos::UserList& users = chromeos::UserManager::Get()->GetUsers(); | 211 const chromeos::UserList& users = chromeos::UserManager::Get()->GetUsers(); |
| 207 | 212 |
| 208 // Fix for users who updated device and thus never passed register screen. | 213 // Fix for users who updated device and thus never passed register screen. |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 567 VLOG(1) << "Initial time zone: " << timezone_name; | 572 VLOG(1) << "Initial time zone: " << timezone_name; |
| 568 // Apply locale customizations only once to preserve whatever locale | 573 // Apply locale customizations only once to preserve whatever locale |
| 569 // user has changed to during OOBE. | 574 // user has changed to during OOBE. |
| 570 if (!timezone_name.empty()) { | 575 if (!timezone_name.empty()) { |
| 571 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( | 576 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( |
| 572 UTF8ToUTF16(timezone_name)); | 577 UTF8ToUTF16(timezone_name)); |
| 573 } | 578 } |
| 574 } | 579 } |
| 575 | 580 |
| 576 } // namespace chromeos | 581 } // namespace chromeos |
| OLD | NEW |