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

Unified Diff: chrome/browser/chromeos/login/ui/login_display_host_impl.cc

Issue 363613004: [cros] Define session_manager component with SessionManager base class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/ui/login_display_host_impl.cc
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
index 5fdd82858cf7e32138336a01983bf68156665eca..d3567e5c7fbbef179b0c3e367d3c0570b6a3c5fa 100644
--- a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
+++ b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
@@ -68,6 +68,7 @@
#include "chromeos/ime/input_method_manager.h"
#include "chromeos/login/login_state.h"
#include "chromeos/settings/timezone_settings.h"
+#include "components/session_manager/core/session_manager.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_frame_host.h"
@@ -1182,32 +1183,36 @@ void ShowLoginWizard(const std::string& first_screen_name) {
gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size()));
+ g_browser_process->platform_part()->SessionManager()->SetSessionState(
+ StartupUtils::IsOobeCompleted()
+ ? session_manager::SESSION_STATE_LOGIN_PRIMARY
+ : session_manager::SESSION_STATE_OOBE);
+
LoginDisplayHost* display_host = new LoginDisplayHostImpl(screen_bounds);
- bool show_app_launch_splash_screen = (first_screen_name ==
- chromeos::WizardController::kAppLaunchSplashScreenName);
+ bool show_app_launch_splash_screen =
+ (first_screen_name == WizardController::kAppLaunchSplashScreenName);
if (show_app_launch_splash_screen) {
const std::string& auto_launch_app_id =
- chromeos::KioskAppManager::Get()->GetAutoLaunchApp();
+ KioskAppManager::Get()->GetAutoLaunchApp();
display_host->StartAppLaunch(auto_launch_app_id,
false /* diagnostic_mode */);
return;
}
- // Check whether we need to execute OOBE process.
- bool oobe_complete = chromeos::StartupUtils::IsOobeCompleted();
+ // Check whether we need to execute OOBE flow.
+ bool oobe_complete = StartupUtils::IsOobeCompleted();
policy::BrowserPolicyConnectorChromeOS* connector =
g_browser_process->platform_part()->browser_policy_connector_chromeos();
bool enrollment_screen_wanted =
- chromeos::WizardController::ShouldRecoverEnrollment() ||
- (chromeos::WizardController::ShouldAutoStartEnrollment() &&
- oobe_complete &&
+ WizardController::ShouldRecoverEnrollment() ||
+ (WizardController::ShouldAutoStartEnrollment() && oobe_complete &&
!connector->IsEnterpriseManaged());
if (enrollment_screen_wanted && first_screen_name.empty()) {
// Shows networks screen instead of enrollment screen to resume the
// interrupted auto start enrollment flow because enrollment screen does
// not handle flaky network. See http://crbug.com/332572
- display_host->StartWizard(chromeos::WizardController::kNetworkScreenName,
+ display_host->StartWizard(WizardController::kNetworkScreenName,
scoped_ptr<base::DictionaryValue>());
return;
}
@@ -1221,7 +1226,7 @@ void ShowLoginWizard(const std::string& first_screen_name) {
bool show_login_screen =
(first_screen_name.empty() && oobe_complete) ||
- first_screen_name == chromeos::WizardController::kLoginScreenName;
+ first_screen_name == WizardController::kLoginScreenName;
if (show_login_screen) {
display_host->StartSignInScreen(LoginScreenContext());
@@ -1229,12 +1234,12 @@ void ShowLoginWizard(const std::string& first_screen_name) {
}
// Load startup manifest.
- const chromeos::StartupCustomizationDocument* startup_manifest =
- chromeos::StartupCustomizationDocument::GetInstance();
+ const StartupCustomizationDocument* startup_manifest =
+ StartupCustomizationDocument::GetInstance();
// Switch to initial locale if specified by customization
// and has not been set yet. We cannot call
- // chromeos::LanguageSwitchMenu::SwitchLanguage here before
+ // LanguageSwitchMenu::SwitchLanguage here before
// EmitLoginPromptReady.
PrefService* prefs = g_browser_process->local_state();
const std::string& current_locale =
@@ -1259,7 +1264,7 @@ void ShowLoginWizard(const std::string& first_screen_name) {
// Don't need to schedule pref save because setting initial local
// will enforce preference saving.
prefs->SetString(prefs::kApplicationLocale, locale);
- chromeos::StartupUtils::SetInitialLocale(locale);
+ StartupUtils::SetInitialLocale(locale);
scoped_ptr<ShowLoginWizardSwitchLanguageCallbackData> data(
new ShowLoginWizardSwitchLanguageCallbackData(
« no previous file with comments | « chrome/browser/chromeos/login/session/user_session_manager.cc ('k') | chrome/browser/chromeos/login/ui/user_adding_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698