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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 175 |
175 void WizardController::Init(const std::string& first_screen_name, | 176 void WizardController::Init(const std::string& first_screen_name, |
176 base::DictionaryValue* screen_parameters) { | 177 base::DictionaryValue* screen_parameters) { |
177 VLOG(1) << "Starting OOBE wizard with screen: " << first_screen_name; | 178 VLOG(1) << "Starting OOBE wizard with screen: " << first_screen_name; |
178 first_screen_name_ = first_screen_name; | 179 first_screen_name_ = first_screen_name; |
179 screen_parameters_.reset(screen_parameters); | 180 screen_parameters_.reset(screen_parameters); |
180 | 181 |
181 bool oobe_complete = IsOobeCompleted(); | 182 bool oobe_complete = IsOobeCompleted(); |
182 if (!oobe_complete || first_screen_name == kOutOfBoxScreenName) { | 183 if (!oobe_complete || first_screen_name == kOutOfBoxScreenName) { |
183 is_out_of_box_ = true; | 184 is_out_of_box_ = true; |
| 185 LoginState::Get()->SetLoginState(LoginState::LOGGED_IN_OOBE); |
| 186 } else { |
| 187 LoginState::Get()->SetLoginState(LoginState::LOGGED_IN_NONE); |
184 } | 188 } |
185 | 189 |
186 AdvanceToScreen(first_screen_name); | 190 AdvanceToScreen(first_screen_name); |
187 content::NotificationService::current()->Notify( | 191 content::NotificationService::current()->Notify( |
188 chrome::NOTIFICATION_WIZARD_FIRST_SCREEN_SHOWN, | 192 chrome::NOTIFICATION_WIZARD_FIRST_SCREEN_SHOWN, |
189 content::NotificationService::AllSources(), | 193 content::NotificationService::AllSources(), |
190 content::NotificationService::NoDetails()); | 194 content::NotificationService::NoDetails()); |
191 if (!IsMachineHWIDCorrect() && !IsDeviceRegistered() && | 195 if (!IsMachineHWIDCorrect() && !IsDeviceRegistered() && |
192 first_screen_name.empty()) | 196 first_screen_name.empty()) |
193 ShowWrongHWIDScreen(); | 197 ShowWrongHWIDScreen(); |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 return zero_delay_enabled_; | 858 return zero_delay_enabled_; |
855 } | 859 } |
856 | 860 |
857 // static | 861 // static |
858 void WizardController::SetZeroDelays() { | 862 void WizardController::SetZeroDelays() { |
859 kShowDelayMs = 0; | 863 kShowDelayMs = 0; |
860 zero_delay_enabled_ = true; | 864 zero_delay_enabled_ = true; |
861 } | 865 } |
862 | 866 |
863 } // namespace chromeos | 867 } // namespace chromeos |
OLD | NEW |