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

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_profile_loader.cc

Issue 23904025: Move IsRunningOnChromeOS to SysInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge fix Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/app_mode/kiosk_profile_loader.h" 5 #include "chrome/browser/chromeos/app_mode/kiosk_profile_loader.h"
6 6
7 #include "base/chromeos/chromeos_version.h"
8 #include "base/logging.h" 7 #include "base/logging.h"
9 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
11 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/sys_info.h"
12 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 12 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
13 #include "chrome/browser/chromeos/login/login_display_host_impl.h" 13 #include "chrome/browser/chromeos/login/login_display_host_impl.h"
14 #include "chrome/browser/chromeos/login/login_status_consumer.h" 14 #include "chrome/browser/chromeos/login/login_status_consumer.h"
15 #include "chrome/browser/chromeos/login/login_utils.h" 15 #include "chrome/browser/chromeos/login/login_utils.h"
16 #include "chrome/browser/chromeos/login/user_manager.h" 16 #include "chrome/browser/chromeos/login/user_manager.h"
17 #include "chrome/browser/chromeos/settings/cros_settings.h" 17 #include "chrome/browser/chromeos/settings/cros_settings.h"
18 #include "chrome/browser/lifetime/application_lifetime.h" 18 #include "chrome/browser/lifetime/application_lifetime.h"
19 #include "chromeos/cryptohome/async_method_caller.h" 19 #include "chromeos/cryptohome/async_method_caller.h"
20 #include "chromeos/cryptohome/cryptohome_library.h" 20 #include "chromeos/cryptohome/cryptohome_library.h"
21 #include "chromeos/dbus/cryptohome_client.h" 21 #include "chromeos/dbus/cryptohome_client.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 FROM_HERE, 106 FROM_HERE,
107 base::Bind(&CryptohomedChecker::StartCheck, AsWeakPtr()), 107 base::Bind(&CryptohomedChecker::StartCheck, AsWeakPtr()),
108 base::TimeDelta::FromMilliseconds(retry_delay_in_milliseconds)); 108 base::TimeDelta::FromMilliseconds(retry_delay_in_milliseconds));
109 return; 109 return;
110 } 110 }
111 111
112 if (is_mounted) 112 if (is_mounted)
113 LOG(ERROR) << "Cryptohome is mounted before launching kiosk app."; 113 LOG(ERROR) << "Cryptohome is mounted before launching kiosk app.";
114 114
115 // Proceed only when cryptohome is not mounded or running on dev box. 115 // Proceed only when cryptohome is not mounded or running on dev box.
116 if (!is_mounted || !base::chromeos::IsRunningOnChromeOS()) 116 if (!is_mounted || !base::SysInfo::IsRunningOnChromeOS())
117 ReportCheckResult(KioskAppLaunchError::NONE); 117 ReportCheckResult(KioskAppLaunchError::NONE);
118 else 118 else
119 ReportCheckResult(KioskAppLaunchError::ALREADY_MOUNTED); 119 ReportCheckResult(KioskAppLaunchError::ALREADY_MOUNTED);
120 } 120 }
121 121
122 void ReportCheckResult(KioskAppLaunchError::Error error) { 122 void ReportCheckResult(KioskAppLaunchError::Error error) {
123 if (error == KioskAppLaunchError::NONE) 123 if (error == KioskAppLaunchError::NONE)
124 loader_->LoginAsKioskAccount(); 124 loader_->LoginAsKioskAccount();
125 else 125 else
126 loader_->ReportLaunchResult(error); 126 loader_->ReportLaunchResult(error);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 void KioskProfileLoader::OnProfilePrepared(Profile* profile) { 217 void KioskProfileLoader::OnProfilePrepared(Profile* profile) {
218 // This object could be deleted any time after successfully reporting 218 // This object could be deleted any time after successfully reporting
219 // a profile load, so invalidate the LoginUtils delegate now. 219 // a profile load, so invalidate the LoginUtils delegate now.
220 LoginUtils::Get()->DelegateDeleted(this); 220 LoginUtils::Get()->DelegateDeleted(this);
221 221
222 delegate_->OnProfileLoaded(profile); 222 delegate_->OnProfileLoaded(profile);
223 ReportLaunchResult(KioskAppLaunchError::NONE); 223 ReportLaunchResult(KioskAppLaunchError::NONE);
224 } 224 }
225 225
226 } // namespace chromeos 226 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/app_mode/kiosk_app_manager.cc ('k') | chrome/browser/chromeos/chrome_browser_main_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698