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

Side by Side Diff: chromeos/chromeos_paths.cc

Issue 27548004: Cache force-installed apps/extensions in device-local accounts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Ready to reland after revert due to conflicting concurrent commit. 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[] =
37 FILE_PATH_LITERAL("/var/cache/device_local_account_extensions");
38
36 bool PathProvider(int key, base::FilePath* result) { 39 bool PathProvider(int key, base::FilePath* result) {
37 switch (key) { 40 switch (key) {
38 case FILE_DEFAULT_APP_ORDER: 41 case FILE_DEFAULT_APP_ORDER:
39 *result = base::FilePath(kDefaultAppOrderFileName); 42 *result = base::FilePath(kDefaultAppOrderFileName);
40 break; 43 break;
41 case DIR_USER_POLICY_KEYS: 44 case DIR_USER_POLICY_KEYS:
42 *result = base::FilePath(kDefaultUserPolicyKeysDir); 45 *result = base::FilePath(kDefaultUserPolicyKeysDir);
43 break; 46 break;
44 case FILE_OWNER_KEY: 47 case FILE_OWNER_KEY:
45 *result = base::FilePath(kOwnerKeyFileName); 48 *result = base::FilePath(kOwnerKeyFileName);
46 break; 49 break;
47 case FILE_INSTALL_ATTRIBUTES: 50 case FILE_INSTALL_ATTRIBUTES:
48 *result = base::FilePath(kInstallAttributesFileName); 51 *result = base::FilePath(kInstallAttributesFileName);
49 break; 52 break;
50 case FILE_UPTIME: 53 case FILE_UPTIME:
51 *result = base::FilePath(kUptimeFileName); 54 *result = base::FilePath(kUptimeFileName);
52 break; 55 break;
53 case FILE_UPDATE_REBOOT_NEEDED_UPTIME: 56 case FILE_UPDATE_REBOOT_NEEDED_UPTIME:
54 *result = base::FilePath(kUpdateRebootNeededUptimeFile); 57 *result = base::FilePath(kUpdateRebootNeededUptimeFile);
55 break; 58 break;
59 case DIR_DEVICE_LOCAL_ACCOUNT_CACHE:
60 *result = base::FilePath(kDeviceLocalAccountCacheDir);
61 break;
56 default: 62 default:
57 return false; 63 return false;
58 } 64 }
59 return true; 65 return true;
60 } 66 }
61 67
62 } // namespace 68 } // namespace
63 69
64 void RegisterPathProvider() { 70 void RegisterPathProvider() {
65 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 71 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
66 } 72 }
67 73
68 } // namespace chromeos 74 } // 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