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

Side by Side Diff: chromeos/chromeos_paths.cc

Issue 780203002: Fix threading bugs in product label UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: File path and ImageSource changes Created 6 years 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
« chromeos/chromeos_paths.h ('K') | « 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/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 26 matching lines...) Expand all
37 37
38 const base::FilePath::CharType kDeviceLocalAccountExtensionDir[] = 38 const base::FilePath::CharType kDeviceLocalAccountExtensionDir[] =
39 FILE_PATH_LITERAL("/var/cache/device_local_account_extensions"); 39 FILE_PATH_LITERAL("/var/cache/device_local_account_extensions");
40 40
41 const base::FilePath::CharType kDeviceLocalAccountExternalDataDir[] = 41 const base::FilePath::CharType kDeviceLocalAccountExternalDataDir[] =
42 FILE_PATH_LITERAL("/var/cache/device_local_account_external_policy_data"); 42 FILE_PATH_LITERAL("/var/cache/device_local_account_external_policy_data");
43 43
44 const base::FilePath::CharType kDeviceLocalAccountComponentPolicy[] = 44 const base::FilePath::CharType kDeviceLocalAccountComponentPolicy[] =
45 FILE_PATH_LITERAL("/var/cache/device_local_account_component_policy"); 45 FILE_PATH_LITERAL("/var/cache/device_local_account_component_policy");
46 46
47 const base::FilePath::CharType kSharedAssetsDir[] =
48 FILE_PATH_LITERAL("/usr/share/chromeos-assets");
49
47 bool PathProvider(int key, base::FilePath* result) { 50 bool PathProvider(int key, base::FilePath* result) {
48 switch (key) { 51 switch (key) {
49 case FILE_DEFAULT_APP_ORDER: 52 case FILE_DEFAULT_APP_ORDER:
50 *result = base::FilePath(kDefaultAppOrderFileName); 53 *result = base::FilePath(kDefaultAppOrderFileName);
51 break; 54 break;
52 case DIR_USER_POLICY_KEYS: 55 case DIR_USER_POLICY_KEYS:
53 *result = base::FilePath(kDefaultUserPolicyKeysDir); 56 *result = base::FilePath(kDefaultUserPolicyKeysDir);
54 break; 57 break;
55 case FILE_OWNER_KEY: 58 case FILE_OWNER_KEY:
56 *result = base::FilePath(kOwnerKeyFileName); 59 *result = base::FilePath(kOwnerKeyFileName);
57 break; 60 break;
58 case FILE_INSTALL_ATTRIBUTES: 61 case FILE_INSTALL_ATTRIBUTES:
59 *result = base::FilePath(kInstallAttributesFileName); 62 *result = base::FilePath(kInstallAttributesFileName);
60 break; 63 break;
61 case FILE_UPTIME: 64 case FILE_UPTIME:
62 *result = base::FilePath(kUptimeFileName); 65 *result = base::FilePath(kUptimeFileName);
63 break; 66 break;
64 case FILE_UPDATE_REBOOT_NEEDED_UPTIME: 67 case FILE_UPDATE_REBOOT_NEEDED_UPTIME:
65 *result = base::FilePath(kUpdateRebootNeededUptimeFile); 68 *result = base::FilePath(kUpdateRebootNeededUptimeFile);
66 break; 69 break;
67 case DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS: 70 case DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS:
68 *result = base::FilePath(kDeviceLocalAccountExtensionDir); 71 *result = base::FilePath(kDeviceLocalAccountExtensionDir);
69 break; 72 break;
70 case DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA: 73 case DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA:
71 *result = base::FilePath(kDeviceLocalAccountExternalDataDir); 74 *result = base::FilePath(kDeviceLocalAccountExternalDataDir);
72 break; 75 break;
73 case DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY: 76 case DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY:
74 *result = base::FilePath(kDeviceLocalAccountComponentPolicy); 77 *result = base::FilePath(kDeviceLocalAccountComponentPolicy);
75 break; 78 break;
79 case DIR_SHARED_ASSETS:
80 *result = base::FilePath(kSharedAssetsDir);
81 break;
76 default: 82 default:
77 return false; 83 return false;
78 } 84 }
79 return true; 85 return true;
80 } 86 }
81 87
82 } // namespace 88 } // namespace
83 89
84 void RegisterPathProvider() { 90 void RegisterPathProvider() {
85 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 91 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
(...skipping 21 matching lines...) Expand all
107 create); 113 create);
108 PathService::Override( 114 PathService::Override(
109 DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, 115 DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS,
110 parent.AppendASCII("stub_device_local_account_extensions")); 116 parent.AppendASCII("stub_device_local_account_extensions"));
111 PathService::Override( 117 PathService::Override(
112 DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA, 118 DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA,
113 parent.AppendASCII("stub_device_local_account_external_data")); 119 parent.AppendASCII("stub_device_local_account_external_data"));
114 PathService::Override( 120 PathService::Override(
115 DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY, 121 DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY,
116 parent.AppendASCII("stub_device_local_account_component_policy")); 122 parent.AppendASCII("stub_device_local_account_component_policy"));
123 PathService::Override(
124 DIR_SHARED_ASSETS,
125 parent.AppendASCII("stub_shared_assets"));
117 } 126 }
118 127
119 } // namespace chromeos 128 } // namespace chromeos
OLDNEW
« chromeos/chromeos_paths.h ('K') | « chromeos/chromeos_paths.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698