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

Side by Side Diff: chromeos/chromeos_paths.cc

Issue 14192016: Move OS_CHROMEOS-specific paths to chromeos/chromeos_paths.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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
« 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chromeos/chromeos_paths.h"
6
7 #include "base/files/file_path.h"
8 #include "base/path_service.h"
9
10 namespace chromeos {
11
12 namespace {
13
14 const base::FilePath::CharType kDefaultAppOrderFileName[] =
15 #if defined(GOOGLE_CHROME_BUILD)
16 FILE_PATH_LITERAL("/usr/share/google-chrome/default_app_order.json");
17 #else
18 FILE_PATH_LITERAL("/usr/share/chromium/default_app_order.json");
19 #endif // defined(GOOGLE_CHROME_BUILD)
20
21 const base::FilePath::CharType kDefaultUserPolicyKeysDir[] =
22 FILE_PATH_LITERAL("/var/run/user_policy");
23
24 const base::FilePath::CharType kOwnerKeyFileName[] =
25 FILE_PATH_LITERAL("/var/lib/whitelist/owner.key");
26
27 const base::FilePath::CharType kInstallAttributesFileName[] =
28 FILE_PATH_LITERAL("/var/run/lockbox/install_attributes.pb");
29
30 const base::FilePath::CharType kUptimeFileName[] =
31 FILE_PATH_LITERAL("/proc/uptime");
32
33 const base::FilePath::CharType kUpdateRebootNeededUptimeFile[] =
34 FILE_PATH_LITERAL("/var/run/chrome/update_reboot_needed_uptime");
35
36 bool PathProvider(int key, base::FilePath* result) {
37 switch (key) {
38 case FILE_DEFAULT_APP_ORDER:
39 *result = base::FilePath(kDefaultAppOrderFileName);
40 break;
41 case DIR_USER_POLICY_KEYS:
42 *result = base::FilePath(kDefaultUserPolicyKeysDir);
43 break;
44 case FILE_OWNER_KEY:
45 *result = base::FilePath(kOwnerKeyFileName);
46 break;
47 case FILE_INSTALL_ATTRIBUTES:
48 *result = base::FilePath(kInstallAttributesFileName);
49 break;
50 case FILE_UPTIME:
51 *result = base::FilePath(kUptimeFileName);
52 break;
53 case FILE_UPDATE_REBOOT_NEEDED_UPTIME:
54 *result = base::FilePath(kUpdateRebootNeededUptimeFile);
55 break;
56 default:
57 return false;
58 }
59 return true;
60 }
61
62 } // namespace
63
64 void RegisterPathProvider() {
65 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
66 }
67
68 } // 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