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

Side by Side Diff: chromeos/chromeos_paths.cc

Issue 2431853002: Remove built-in path check from Quirks (Closed)
Patch Set: Created 4 years, 2 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
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 const base::FilePath::CharType kDeviceLocalAccountExternalDataDir[] = 44 const base::FilePath::CharType kDeviceLocalAccountExternalDataDir[] =
45 FILE_PATH_LITERAL("/var/cache/device_local_account_external_policy_data"); 45 FILE_PATH_LITERAL("/var/cache/device_local_account_external_policy_data");
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 kDeviceColorProfileDirectory[] =
54 FILE_PATH_LITERAL("/usr/share/color/icc");
55
56 const base::FilePath::CharType kDeviceExtensionLocalCache[] = 53 const base::FilePath::CharType kDeviceExtensionLocalCache[] =
57 FILE_PATH_LITERAL("/var/cache/external_cache"); 54 FILE_PATH_LITERAL("/var/cache/external_cache");
58 55
59 bool PathProvider(int key, base::FilePath* result) { 56 bool PathProvider(int key, base::FilePath* result) {
60 switch (key) { 57 switch (key) {
61 case FILE_DEFAULT_APP_ORDER: 58 case FILE_DEFAULT_APP_ORDER:
62 *result = base::FilePath(kDefaultAppOrderFileName); 59 *result = base::FilePath(kDefaultAppOrderFileName);
63 break; 60 break;
64 case DIR_USER_POLICY_KEYS: 61 case DIR_USER_POLICY_KEYS:
65 *result = base::FilePath(kDefaultUserPolicyKeysDir); 62 *result = base::FilePath(kDefaultUserPolicyKeysDir);
(...skipping 18 matching lines...) Expand all
84 break; 81 break;
85 case DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA: 82 case DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA:
86 *result = base::FilePath(kDeviceLocalAccountExternalDataDir); 83 *result = base::FilePath(kDeviceLocalAccountExternalDataDir);
87 break; 84 break;
88 case DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY: 85 case DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY:
89 *result = base::FilePath(kDeviceLocalAccountComponentPolicy); 86 *result = base::FilePath(kDeviceLocalAccountComponentPolicy);
90 break; 87 break;
91 case DIR_DEVICE_DISPLAY_PROFILES: 88 case DIR_DEVICE_DISPLAY_PROFILES:
92 *result = base::FilePath(kDeviceDisplayProfileDirectory); 89 *result = base::FilePath(kDeviceDisplayProfileDirectory);
93 break; 90 break;
94 case DIR_DEVICE_COLOR_CALIBRATION_PROFILES:
95 *result = base::FilePath(kDeviceColorProfileDirectory);
96 break;
97 case DIR_DEVICE_EXTENSION_LOCAL_CACHE: 91 case DIR_DEVICE_EXTENSION_LOCAL_CACHE:
98 *result = base::FilePath(kDeviceExtensionLocalCache); 92 *result = base::FilePath(kDeviceExtensionLocalCache);
99 break; 93 break;
100 default: 94 default:
101 return false; 95 return false;
102 } 96 }
103 return true; 97 return true;
104 } 98 }
105 99
106 } // namespace 100 } // namespace
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 parent.AppendASCII("stub_device_local_account_external_data")); 136 parent.AppendASCII("stub_device_local_account_external_data"));
143 PathService::Override( 137 PathService::Override(
144 DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY, 138 DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY,
145 parent.AppendASCII("stub_device_local_account_component_policy")); 139 parent.AppendASCII("stub_device_local_account_component_policy"));
146 PathService::Override( 140 PathService::Override(
147 DIR_DEVICE_EXTENSION_LOCAL_CACHE, 141 DIR_DEVICE_EXTENSION_LOCAL_CACHE,
148 parent.AppendASCII("stub_device_local_extension_cache")); 142 parent.AppendASCII("stub_device_local_extension_cache"));
149 } 143 }
150 144
151 } // namespace chromeos 145 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698