| Index: chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc
|
| diff --git a/chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc b/chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc
|
| index 6be11b895d9e117c323bd0ae6afa70ac9287a08e..d6c2d16e958b33d7b4e9f7e86bd542a5450c53d5 100644
|
| --- a/chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc
|
| +++ b/chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc
|
| @@ -27,9 +27,12 @@
|
| #include "extensions/common/extension.h"
|
| #include "ui/base/window_open_disposition.h"
|
|
|
| +namespace {
|
| +const char kDemoUserName[] = "demouser@demo.app.local";
|
| +}
|
| +
|
| namespace chromeos {
|
|
|
| -const char DemoAppLauncher::kDemoUserName[] = "demouser@demo.app.local";
|
| const char DemoAppLauncher::kDemoAppId[] = "klimoghijjogocdbaikffefjfcfheiel";
|
| const base::FilePath::CharType kDefaultDemoAppPath[] =
|
| FILE_PATH_LITERAL("/usr/share/chromeos-assets/demo_app");
|
| @@ -50,13 +53,13 @@ void DemoAppLauncher::StartDemoAppLaunch() {
|
| DVLOG(1) << "Launching demo app...";
|
| // user_id = DemoAppUserId, force_emphemeral = true, delegate = this.
|
| kiosk_profile_loader_.reset(
|
| - new KioskProfileLoader(kDemoUserName, true, this));
|
| + new KioskProfileLoader(GetDemoUserID(), true, this));
|
| kiosk_profile_loader_->Start();
|
| }
|
|
|
| // static
|
| -bool DemoAppLauncher::IsDemoAppSession(const std::string& user_id) {
|
| - return user_id == kDemoUserName;
|
| +bool DemoAppLauncher::IsDemoAppSession(const user_manager::UserID& user_id) {
|
| + return user_id == GetDemoUserID();
|
| }
|
|
|
| // static
|
| @@ -65,6 +68,11 @@ void DemoAppLauncher::SetDemoAppPathForTesting(const base::FilePath& path) {
|
| demo_app_path_ = new base::FilePath(path);
|
| }
|
|
|
| +// static
|
| +user_manager::UserID DemoAppLauncher::GetDemoUserID() {
|
| + return user_manager::UserID::FromUserEmail(kDemoUserName);
|
| +}
|
| +
|
| void DemoAppLauncher::OnProfileLoaded(Profile* profile) {
|
| DVLOG(1) << "Profile loaded... Starting demo app launch.";
|
|
|
|
|