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

Side by Side Diff: chromeos/chromeos_paths.cc

Issue 25242002: Support policies referencing external data for device-local accounts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/chromeos_paths.h ('k') | no next file » | 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/path_service.h" 8 #include "base/path_service.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
(...skipping 15 matching lines...) Expand all
26 26
27 const base::FilePath::CharType kInstallAttributesFileName[] = 27 const base::FilePath::CharType kInstallAttributesFileName[] =
28 FILE_PATH_LITERAL("/var/run/lockbox/install_attributes.pb"); 28 FILE_PATH_LITERAL("/var/run/lockbox/install_attributes.pb");
29 29
30 const base::FilePath::CharType kUptimeFileName[] = 30 const base::FilePath::CharType kUptimeFileName[] =
31 FILE_PATH_LITERAL("/proc/uptime"); 31 FILE_PATH_LITERAL("/proc/uptime");
32 32
33 const base::FilePath::CharType kUpdateRebootNeededUptimeFile[] = 33 const base::FilePath::CharType kUpdateRebootNeededUptimeFile[] =
34 FILE_PATH_LITERAL("/var/run/chrome/update_reboot_needed_uptime"); 34 FILE_PATH_LITERAL("/var/run/chrome/update_reboot_needed_uptime");
35 35
36 const base::FilePath::CharType kDeviceLocalAccountCacheDir[] = 36 const base::FilePath::CharType kDeviceLocalAccountExtensionDir[] =
37 FILE_PATH_LITERAL("/var/cache/device_local_account_extensions"); 37 FILE_PATH_LITERAL("/var/cache/device_local_account_extensions");
38 38
39 const base::FilePath::CharType kDeviceLocalAccountExternalDataDir[] =
40 FILE_PATH_LITERAL("/var/cache/device_local_account_external_policy_data");
41
39 bool PathProvider(int key, base::FilePath* result) { 42 bool PathProvider(int key, base::FilePath* result) {
40 switch (key) { 43 switch (key) {
41 case FILE_DEFAULT_APP_ORDER: 44 case FILE_DEFAULT_APP_ORDER:
42 *result = base::FilePath(kDefaultAppOrderFileName); 45 *result = base::FilePath(kDefaultAppOrderFileName);
43 break; 46 break;
44 case DIR_USER_POLICY_KEYS: 47 case DIR_USER_POLICY_KEYS:
45 *result = base::FilePath(kDefaultUserPolicyKeysDir); 48 *result = base::FilePath(kDefaultUserPolicyKeysDir);
46 break; 49 break;
47 case FILE_OWNER_KEY: 50 case FILE_OWNER_KEY:
48 *result = base::FilePath(kOwnerKeyFileName); 51 *result = base::FilePath(kOwnerKeyFileName);
49 break; 52 break;
50 case FILE_INSTALL_ATTRIBUTES: 53 case FILE_INSTALL_ATTRIBUTES:
51 *result = base::FilePath(kInstallAttributesFileName); 54 *result = base::FilePath(kInstallAttributesFileName);
52 break; 55 break;
53 case FILE_UPTIME: 56 case FILE_UPTIME:
54 *result = base::FilePath(kUptimeFileName); 57 *result = base::FilePath(kUptimeFileName);
55 break; 58 break;
56 case FILE_UPDATE_REBOOT_NEEDED_UPTIME: 59 case FILE_UPDATE_REBOOT_NEEDED_UPTIME:
57 *result = base::FilePath(kUpdateRebootNeededUptimeFile); 60 *result = base::FilePath(kUpdateRebootNeededUptimeFile);
58 break; 61 break;
59 case DIR_DEVICE_LOCAL_ACCOUNT_CACHE: 62 case DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS:
60 *result = base::FilePath(kDeviceLocalAccountCacheDir); 63 *result = base::FilePath(kDeviceLocalAccountExtensionDir);
64 break;
65 case DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA:
66 *result = base::FilePath(kDeviceLocalAccountExternalDataDir);
61 break; 67 break;
62 default: 68 default:
63 return false; 69 return false;
64 } 70 }
65 return true; 71 return true;
66 } 72 }
67 73
68 } // namespace 74 } // namespace
69 75
70 void RegisterPathProvider() { 76 void RegisterPathProvider() {
71 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 77 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
72 } 78 }
73 79
74 } // namespace chromeos 80 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/chromeos_paths.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698