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

Side by Side Diff: chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc

Issue 1693383003: ChromeOS cryptohome should be able to use gaia id as user identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit tests. Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/demo_mode/demo_app_launcher.h" 5 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 10 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 demo_app_path_ = new base::FilePath(kDefaultDemoAppPath); 42 demo_app_path_ = new base::FilePath(kDefaultDemoAppPath);
43 } 43 }
44 44
45 DemoAppLauncher::~DemoAppLauncher() { 45 DemoAppLauncher::~DemoAppLauncher() {
46 delete demo_app_path_; 46 delete demo_app_path_;
47 } 47 }
48 48
49 void DemoAppLauncher::StartDemoAppLaunch() { 49 void DemoAppLauncher::StartDemoAppLaunch() {
50 DVLOG(1) << "Launching demo app..."; 50 DVLOG(1) << "Launching demo app...";
51 // user_id = DemoAppUserId, force_emphemeral = true, delegate = this. 51 // user_id = DemoAppUserId, force_emphemeral = true, delegate = this.
52 kiosk_profile_loader_.reset(new KioskProfileLoader( 52 kiosk_profile_loader_.reset(
53 login::DemoAccountId().GetUserEmail(), true, this)); 53 new KioskProfileLoader(login::DemoAccountId(), true, this));
54 kiosk_profile_loader_->Start(); 54 kiosk_profile_loader_->Start();
55 } 55 }
56 56
57 // static 57 // static
58 bool DemoAppLauncher::IsDemoAppSession(const std::string& user_id) { 58 bool DemoAppLauncher::IsDemoAppSession(const AccountId& account_id) {
59 return user_id == login::DemoAccountId().GetUserEmail(); 59 return account_id == login::DemoAccountId();
60 } 60 }
61 61
62 // static 62 // static
63 void DemoAppLauncher::SetDemoAppPathForTesting(const base::FilePath& path) { 63 void DemoAppLauncher::SetDemoAppPathForTesting(const base::FilePath& path) {
64 delete demo_app_path_; 64 delete demo_app_path_;
65 demo_app_path_ = new base::FilePath(path); 65 demo_app_path_ = new base::FilePath(path);
66 } 66 }
67 67
68 void DemoAppLauncher::OnProfileLoaded(Profile* profile) { 68 void DemoAppLauncher::OnProfileLoaded(Profile* profile) {
69 DVLOG(1) << "Profile loaded... Starting demo app launch."; 69 DVLOG(1) << "Profile loaded... Starting demo app launch.";
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 LoginDisplayHost::default_host()->Finalize(); 104 LoginDisplayHost::default_host()->Finalize();
105 } 105 }
106 106
107 void DemoAppLauncher::OnProfileLoadFailed(KioskAppLaunchError::Error error) { 107 void DemoAppLauncher::OnProfileLoadFailed(KioskAppLaunchError::Error error) {
108 LOG(ERROR) << "Loading the Kiosk Profile failed: " << 108 LOG(ERROR) << "Loading the Kiosk Profile failed: " <<
109 KioskAppLaunchError::GetErrorMessage(error); 109 KioskAppLaunchError::GetErrorMessage(error);
110 } 110 }
111 111
112 } // namespace chromeos 112 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698