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

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

Issue 565293003: Revert of Non-plafrom-specific part of an OwnerSettingsService is moved to components/ownership/*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/chrome_browser_main_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_app_manager.h" 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/path_service.h" 14 #include "base/path_service.h"
15 #include "base/prefs/pref_registry_simple.h" 15 #include "base/prefs/pref_registry_simple.h"
16 #include "base/prefs/pref_service.h" 16 #include "base/prefs/pref_service.h"
17 #include "base/prefs/scoped_user_pref_update.h" 17 #include "base/prefs/scoped_user_pref_update.h"
18 #include "base/stl_util.h" 18 #include "base/stl_util.h"
19 #include "base/sys_info.h" 19 #include "base/sys_info.h"
20 #include "chrome/browser/browser_process.h" 20 #include "chrome/browser/browser_process.h"
21 #include "chrome/browser/chromeos/app_mode/kiosk_app_data.h" 21 #include "chrome/browser/chromeos/app_mode/kiosk_app_data.h"
22 #include "chrome/browser/chromeos/app_mode/kiosk_app_external_loader.h" 22 #include "chrome/browser/chromeos/app_mode/kiosk_app_external_loader.h"
23 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h" 23 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h"
24 #include "chrome/browser/chromeos/app_mode/kiosk_external_updater.h" 24 #include "chrome/browser/chromeos/app_mode/kiosk_external_updater.h"
25 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact ory.h" 25 #include "chrome/browser/chromeos/ownership/owner_settings_service_factory.h"
26 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 26 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
27 #include "chrome/browser/chromeos/policy/device_local_account.h" 27 #include "chrome/browser/chromeos/policy/device_local_account.h"
28 #include "chrome/browser/chromeos/settings/cros_settings.h" 28 #include "chrome/browser/chromeos/settings/cros_settings.h"
29 #include "chrome/browser/extensions/external_loader.h" 29 #include "chrome/browser/extensions/external_loader.h"
30 #include "chrome/browser/extensions/external_provider_impl.h" 30 #include "chrome/browser/extensions/external_provider_impl.h"
31 #include "chrome/common/chrome_paths.h" 31 #include "chrome/common/chrome_paths.h"
32 #include "chrome/common/extensions/extension_constants.h" 32 #include "chrome/common/extensions/extension_constants.h"
33 #include "chromeos/chromeos_paths.h" 33 #include "chromeos/chromeos_paths.h"
34 #include "chromeos/cryptohome/async_method_caller.h" 34 #include "chromeos/cryptohome/async_method_caller.h"
35 #include "chromeos/settings/cros_settings_names.h" 35 #include "chromeos/settings/cros_settings_names.h"
(...skipping 16 matching lines...) Expand all
52 cryptohome::MountError return_code) { 52 cryptohome::MountError return_code) {
53 if (!success) { 53 if (!success) {
54 LOG(ERROR) << "Remove cryptohome for " << app 54 LOG(ERROR) << "Remove cryptohome for " << app
55 << " failed, return code: " << return_code; 55 << " failed, return code: " << return_code;
56 } 56 }
57 } 57 }
58 58
59 // Check for presence of machine owner public key file. 59 // Check for presence of machine owner public key file.
60 void CheckOwnerFilePresence(bool *present) { 60 void CheckOwnerFilePresence(bool *present) {
61 scoped_refptr<ownership::OwnerKeyUtil> util = 61 scoped_refptr<ownership::OwnerKeyUtil> util =
62 OwnerSettingsServiceChromeOSFactory::GetInstance()->GetOwnerKeyUtil(); 62 OwnerSettingsServiceFactory::GetInstance()->GetOwnerKeyUtil();
63 *present = util.get() && util->IsPublicKeyPresent(); 63 *present = util.get() && util->IsPublicKeyPresent();
64 } 64 }
65 65
66 scoped_refptr<base::SequencedTaskRunner> GetBackgroundTaskRunner() { 66 scoped_refptr<base::SequencedTaskRunner> GetBackgroundTaskRunner() {
67 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); 67 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool();
68 CHECK(pool); 68 CHECK(pool);
69 return pool->GetSequencedTaskRunnerWithShutdownBehavior( 69 return pool->GetSequencedTaskRunnerWithShutdownBehavior(
70 pool->GetSequenceToken(), base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); 70 pool->GetSequenceToken(), base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
71 } 71 }
72 72
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 *cache_dir = user_data_dir.AppendASCII(kCrxCacheDir); 626 *cache_dir = user_data_dir.AppendASCII(kCrxCacheDir);
627 } 627 }
628 628
629 void KioskAppManager::GetCrxUnpackDir(base::FilePath* unpack_dir) { 629 void KioskAppManager::GetCrxUnpackDir(base::FilePath* unpack_dir) {
630 base::FilePath temp_dir; 630 base::FilePath temp_dir;
631 base::GetTempDir(&temp_dir); 631 base::GetTempDir(&temp_dir);
632 *unpack_dir = temp_dir.AppendASCII(kCrxUnpackDir); 632 *unpack_dir = temp_dir.AppendASCII(kCrxUnpackDir);
633 } 633 }
634 634
635 } // namespace chromeos 635 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/chrome_browser_main_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698