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

Side by Side Diff: chromeos/chromeos_paths.cc

Issue 2441653003: Enable fetching of admin policies for login screen apps (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 | « chromeos/chromeos_paths.h ('k') | components/policy/core/common/cloud/cloud_policy_manager.h » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chromeos/chromeos_paths.h" 5 #include "chromeos/chromeos_paths.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/sys_info.h" 10 #include "base/sys_info.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 const base::FilePath::CharType kDeviceLocalAccountComponentPolicy[] = 47 const base::FilePath::CharType kDeviceLocalAccountComponentPolicy[] =
48 FILE_PATH_LITERAL("/var/cache/device_local_account_component_policy"); 48 FILE_PATH_LITERAL("/var/cache/device_local_account_component_policy");
49 49
50 const base::FilePath::CharType kDeviceDisplayProfileDirectory[] = 50 const base::FilePath::CharType kDeviceDisplayProfileDirectory[] =
51 FILE_PATH_LITERAL("/var/cache/display_profiles"); 51 FILE_PATH_LITERAL("/var/cache/display_profiles");
52 52
53 const base::FilePath::CharType kDeviceExtensionLocalCache[] = 53 const base::FilePath::CharType kDeviceExtensionLocalCache[] =
54 FILE_PATH_LITERAL("/var/cache/external_cache"); 54 FILE_PATH_LITERAL("/var/cache/external_cache");
55 55
56 const base::FilePath::CharType kSigninProfileComponentPolicy[] =
57 FILE_PATH_LITERAL("/var/cache/signin_profile_component_policy");
58
56 bool PathProvider(int key, base::FilePath* result) { 59 bool PathProvider(int key, base::FilePath* result) {
57 switch (key) { 60 switch (key) {
58 case FILE_DEFAULT_APP_ORDER: 61 case FILE_DEFAULT_APP_ORDER:
59 *result = base::FilePath(kDefaultAppOrderFileName); 62 *result = base::FilePath(kDefaultAppOrderFileName);
60 break; 63 break;
61 case DIR_USER_POLICY_KEYS: 64 case DIR_USER_POLICY_KEYS:
62 *result = base::FilePath(kDefaultUserPolicyKeysDir); 65 *result = base::FilePath(kDefaultUserPolicyKeysDir);
63 break; 66 break;
64 case FILE_OWNER_KEY: 67 case FILE_OWNER_KEY:
65 *result = base::FilePath(kOwnerKeyFileName); 68 *result = base::FilePath(kOwnerKeyFileName);
(...skipping 18 matching lines...) Expand all
84 break; 87 break;
85 case DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY: 88 case DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY:
86 *result = base::FilePath(kDeviceLocalAccountComponentPolicy); 89 *result = base::FilePath(kDeviceLocalAccountComponentPolicy);
87 break; 90 break;
88 case DIR_DEVICE_DISPLAY_PROFILES: 91 case DIR_DEVICE_DISPLAY_PROFILES:
89 *result = base::FilePath(kDeviceDisplayProfileDirectory); 92 *result = base::FilePath(kDeviceDisplayProfileDirectory);
90 break; 93 break;
91 case DIR_DEVICE_EXTENSION_LOCAL_CACHE: 94 case DIR_DEVICE_EXTENSION_LOCAL_CACHE:
92 *result = base::FilePath(kDeviceExtensionLocalCache); 95 *result = base::FilePath(kDeviceExtensionLocalCache);
93 break; 96 break;
97 case DIR_SIGNIN_PROFILE_COMPONENT_POLICY:
98 *result = base::FilePath(kSigninProfileComponentPolicy);
99 break;
94 default: 100 default:
95 return false; 101 return false;
96 } 102 }
97 return true; 103 return true;
98 } 104 }
99 105
100 } // namespace 106 } // namespace
101 107
102 void RegisterPathProvider() { 108 void RegisterPathProvider() {
103 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 109 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
(...skipping 29 matching lines...) Expand all
133 parent.AppendASCII("stub_device_local_account_extensions")); 139 parent.AppendASCII("stub_device_local_account_extensions"));
134 PathService::Override( 140 PathService::Override(
135 DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA, 141 DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA,
136 parent.AppendASCII("stub_device_local_account_external_data")); 142 parent.AppendASCII("stub_device_local_account_external_data"));
137 PathService::Override( 143 PathService::Override(
138 DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY, 144 DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY,
139 parent.AppendASCII("stub_device_local_account_component_policy")); 145 parent.AppendASCII("stub_device_local_account_component_policy"));
140 PathService::Override( 146 PathService::Override(
141 DIR_DEVICE_EXTENSION_LOCAL_CACHE, 147 DIR_DEVICE_EXTENSION_LOCAL_CACHE,
142 parent.AppendASCII("stub_device_local_extension_cache")); 148 parent.AppendASCII("stub_device_local_extension_cache"));
149 PathService::Override(
150 DIR_SIGNIN_PROFILE_COMPONENT_POLICY,
151 parent.AppendASCII("stub_signin_profile_component_policy"));
143 } 152 }
144 153
145 } // namespace chromeos 154 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/chromeos_paths.h ('k') | components/policy/core/common/cloud/cloud_policy_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698