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/wizard_controller.h" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
6 | 6 |
7 #include <signal.h> | 7 #include <signal.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 #include "chrome/browser/chromeos/net/network_portal_detector.h" | 45 #include "chrome/browser/chromeos/net/network_portal_detector.h" |
46 #include "chrome/browser/chromeos/settings/cros_settings.h" | 46 #include "chrome/browser/chromeos/settings/cros_settings.h" |
47 #include "chrome/browser/chromeos/settings/cros_settings_names.h" | 47 #include "chrome/browser/chromeos/settings/cros_settings_names.h" |
48 #include "chrome/browser/profiles/profile.h" | 48 #include "chrome/browser/profiles/profile.h" |
49 #include "chrome/browser/profiles/profile_manager.h" | 49 #include "chrome/browser/profiles/profile_manager.h" |
50 #include "chrome/browser/ui/options/options_util.h" | 50 #include "chrome/browser/ui/options/options_util.h" |
51 #include "chrome/common/chrome_notification_types.h" | 51 #include "chrome/common/chrome_notification_types.h" |
52 #include "chrome/common/pref_names.h" | 52 #include "chrome/common/pref_names.h" |
53 #include "chromeos/dbus/dbus_thread_manager.h" | 53 #include "chromeos/dbus/dbus_thread_manager.h" |
54 #include "chromeos/dbus/session_manager_client.h" | 54 #include "chromeos/dbus/session_manager_client.h" |
55 #include "chromeos/login/login_state.h" | |
55 #include "content/public/browser/browser_thread.h" | 56 #include "content/public/browser/browser_thread.h" |
56 #include "content/public/browser/notification_service.h" | 57 #include "content/public/browser/notification_service.h" |
57 #include "content/public/browser/notification_source.h" | 58 #include "content/public/browser/notification_source.h" |
58 #include "content/public/browser/notification_types.h" | 59 #include "content/public/browser/notification_types.h" |
59 #include "ui/base/accelerators/accelerator.h" | 60 #include "ui/base/accelerators/accelerator.h" |
60 #include "ui/base/l10n/l10n_util.h" | 61 #include "ui/base/l10n/l10n_util.h" |
61 | 62 |
62 #if defined(USE_LINUX_BREAKPAD) | 63 #if defined(USE_LINUX_BREAKPAD) |
63 #include "chrome/app/breakpad_linux.h" | 64 #include "chrome/app/breakpad_linux.h" |
64 #endif | 65 #endif |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
175 | 176 |
176 void WizardController::Init(const std::string& first_screen_name, | 177 void WizardController::Init(const std::string& first_screen_name, |
177 base::DictionaryValue* screen_parameters) { | 178 base::DictionaryValue* screen_parameters) { |
178 VLOG(1) << "Starting OOBE wizard with screen: " << first_screen_name; | 179 VLOG(1) << "Starting OOBE wizard with screen: " << first_screen_name; |
179 first_screen_name_ = first_screen_name; | 180 first_screen_name_ = first_screen_name; |
180 screen_parameters_.reset(screen_parameters); | 181 screen_parameters_.reset(screen_parameters); |
181 | 182 |
182 bool oobe_complete = IsOobeCompleted(); | 183 bool oobe_complete = IsOobeCompleted(); |
183 if (!oobe_complete || first_screen_name == kOutOfBoxScreenName) { | 184 if (!oobe_complete || first_screen_name == kOutOfBoxScreenName) { |
184 is_out_of_box_ = true; | 185 is_out_of_box_ = true; |
186 LoginState::Get()->SetLoggedInState( | |
Nikita (slow)
2013/04/10 08:09:22
This has to be moved to base_login_display_host.cc
stevenjb
2013/04/10 16:32:17
Ah, thanks. Done.
| |
187 LoginState::LOGGED_IN_OOBE, LoginState::LOGGED_IN_USER_NONE); | |
188 } else { | |
189 LoginState::Get()->SetLoggedInState( | |
190 LoginState::LOGGED_IN_NONE, LoginState::LOGGED_IN_USER_NONE); | |
185 } | 191 } |
186 | 192 |
187 AdvanceToScreen(first_screen_name); | 193 AdvanceToScreen(first_screen_name); |
188 content::NotificationService::current()->Notify( | 194 content::NotificationService::current()->Notify( |
189 chrome::NOTIFICATION_WIZARD_FIRST_SCREEN_SHOWN, | 195 chrome::NOTIFICATION_WIZARD_FIRST_SCREEN_SHOWN, |
190 content::NotificationService::AllSources(), | 196 content::NotificationService::AllSources(), |
191 content::NotificationService::NoDetails()); | 197 content::NotificationService::NoDetails()); |
192 if (!IsMachineHWIDCorrect() && !IsDeviceRegistered() && | 198 if (!IsMachineHWIDCorrect() && !IsDeviceRegistered() && |
193 first_screen_name.empty()) | 199 first_screen_name.empty()) |
194 ShowWrongHWIDScreen(); | 200 ShowWrongHWIDScreen(); |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
890 return zero_delay_enabled_; | 896 return zero_delay_enabled_; |
891 } | 897 } |
892 | 898 |
893 // static | 899 // static |
894 void WizardController::SetZeroDelays() { | 900 void WizardController::SetZeroDelays() { |
895 kShowDelayMs = 0; | 901 kShowDelayMs = 0; |
896 zero_delay_enabled_ = true; | 902 zero_delay_enabled_ = true; |
897 } | 903 } |
898 | 904 |
899 } // namespace chromeos | 905 } // namespace chromeos |
OLD | NEW |