Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
| 8 #include <signal.h> | 8 #include <signal.h> |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 #include "chrome/browser/chromeos/login/login_display_host.h" | 28 #include "chrome/browser/chromeos/login/login_display_host.h" |
| 29 #include "chrome/browser/chromeos/login/login_utils.h" | 29 #include "chrome/browser/chromeos/login/login_utils.h" |
| 30 #include "chrome/browser/chromeos/login/network_screen.h" | 30 #include "chrome/browser/chromeos/login/network_screen.h" |
| 31 #include "chrome/browser/chromeos/login/oobe_display.h" | 31 #include "chrome/browser/chromeos/login/oobe_display.h" |
| 32 #include "chrome/browser/chromeos/login/registration_screen.h" | 32 #include "chrome/browser/chromeos/login/registration_screen.h" |
| 33 #include "chrome/browser/chromeos/login/update_screen.h" | 33 #include "chrome/browser/chromeos/login/update_screen.h" |
| 34 #include "chrome/browser/chromeos/login/user_image_screen.h" | 34 #include "chrome/browser/chromeos/login/user_image_screen.h" |
| 35 #include "chrome/browser/chromeos/login/user_manager.h" | 35 #include "chrome/browser/chromeos/login/user_manager.h" |
| 36 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" | 36 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" |
| 37 #include "chrome/browser/chromeos/metrics_cros_settings_provider.h" | 37 #include "chrome/browser/chromeos/metrics_cros_settings_provider.h" |
| 38 #include "chrome/browser/policy/enterprise_metrics.h" | |
| 38 #include "chrome/browser/prefs/pref_service.h" | 39 #include "chrome/browser/prefs/pref_service.h" |
| 39 #include "chrome/browser/profiles/profile_manager.h" | 40 #include "chrome/browser/profiles/profile_manager.h" |
| 40 #include "chrome/common/pref_names.h" | 41 #include "chrome/common/pref_names.h" |
| 41 #include "content/common/notification_service.h" | 42 #include "content/common/notification_service.h" |
| 42 #include "content/common/notification_type.h" | 43 #include "content/common/notification_type.h" |
| 43 #include "ui/base/l10n/l10n_util.h" | 44 #include "ui/base/l10n/l10n_util.h" |
| 44 #include "views/accelerator.h" | 45 #include "views/accelerator.h" |
| 45 | 46 |
| 46 namespace { | 47 namespace { |
| 47 | 48 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 const std::string& value) { | 87 const std::string& value) { |
| 87 PrefService* prefs = g_browser_process->local_state(); | 88 PrefService* prefs = g_browser_process->local_state(); |
| 88 prefs->SetString(pref_name, value); | 89 prefs->SetString(pref_name, value); |
| 89 prefs->SavePersistentPrefs(); | 90 prefs->SavePersistentPrefs(); |
| 90 } | 91 } |
| 91 | 92 |
| 92 } // namespace | 93 } // namespace |
| 93 | 94 |
| 94 namespace chromeos { | 95 namespace chromeos { |
| 95 | 96 |
| 97 namespace em = enterprise_management; | |
| 98 | |
| 96 const char WizardController::kNetworkScreenName[] = "network"; | 99 const char WizardController::kNetworkScreenName[] = "network"; |
| 97 const char WizardController::kLoginScreenName[] = "login"; | 100 const char WizardController::kLoginScreenName[] = "login"; |
| 98 const char WizardController::kUpdateScreenName[] = "update"; | 101 const char WizardController::kUpdateScreenName[] = "update"; |
| 99 const char WizardController::kUserImageScreenName[] = "image"; | 102 const char WizardController::kUserImageScreenName[] = "image"; |
| 100 const char WizardController::kEulaScreenName[] = "eula"; | 103 const char WizardController::kEulaScreenName[] = "eula"; |
| 101 const char WizardController::kRegistrationScreenName[] = "register"; | 104 const char WizardController::kRegistrationScreenName[] = "register"; |
| 102 const char WizardController::kHTMLPageScreenName[] = "html"; | 105 const char WizardController::kHTMLPageScreenName[] = "html"; |
| 103 const char WizardController::kEnterpriseEnrollmentScreenName[] = "enroll"; | 106 const char WizardController::kEnterpriseEnrollmentScreenName[] = "enroll"; |
| 104 | 107 |
| 105 // Passing this parameter as a "first screen" initiates full OOBE flow. | 108 // Passing this parameter as a "first screen" initiates full OOBE flow. |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 288 } | 291 } |
| 289 | 292 |
| 290 void WizardController::ShowHTMLPageScreen() { | 293 void WizardController::ShowHTMLPageScreen() { |
| 291 VLOG(1) << "Showing HTML page screen."; | 294 VLOG(1) << "Showing HTML page screen."; |
| 292 SetStatusAreaVisible(true); | 295 SetStatusAreaVisible(true); |
| 293 host_->SetOobeProgressBarVisible(false); | 296 host_->SetOobeProgressBarVisible(false); |
| 294 SetCurrentScreen(GetHTMLPageScreen()); | 297 SetCurrentScreen(GetHTMLPageScreen()); |
| 295 } | 298 } |
| 296 | 299 |
| 297 void WizardController::ShowEnterpriseEnrollmentScreen() { | 300 void WizardController::ShowEnterpriseEnrollmentScreen() { |
| 301 em::LogEnrollmentOperation(em::kEnrollmentShowScreen); | |
|
kmixter1
2011/06/28 01:06:02
how is this different from kEnrollmentStarted? Is
Joao da Silva
2011/06/30 12:57:00
As you mention, this meant the enrollment screen w
| |
| 298 SetStatusAreaVisible(true); | 302 SetStatusAreaVisible(true); |
| 299 host_->SetOobeProgress(chromeos::BackgroundView::SIGNIN); | 303 host_->SetOobeProgress(chromeos::BackgroundView::SIGNIN); |
| 300 SetCurrentScreen(GetEnterpriseEnrollmentScreen()); | 304 SetCurrentScreen(GetEnterpriseEnrollmentScreen()); |
| 301 } | 305 } |
| 302 | 306 |
| 303 void WizardController::SkipRegistration() { | 307 void WizardController::SkipRegistration() { |
| 304 if (current_screen_ == GetRegistrationScreen()) | 308 if (current_screen_ == GetRegistrationScreen()) |
| 305 OnRegistrationSkipped(); | 309 OnRegistrationSkipped(); |
| 306 else | 310 else |
| 307 LOG(ERROR) << "Registration screen is not active."; | 311 LOG(ERROR) << "Registration screen is not active."; |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 682 | 686 |
| 683 bool WizardController::usage_statistics_reporting() const { | 687 bool WizardController::usage_statistics_reporting() const { |
| 684 return usage_statistics_reporting_; | 688 return usage_statistics_reporting_; |
| 685 } | 689 } |
| 686 | 690 |
| 687 void WizardController::SetZeroDelays() { | 691 void WizardController::SetZeroDelays() { |
| 688 kShowDelayMs = 0; | 692 kShowDelayMs = 0; |
| 689 } | 693 } |
| 690 | 694 |
| 691 } // namespace chromeos | 695 } // namespace chromeos |
| OLD | NEW |