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

Side by Side Diff: chromeos/chromeos_paths.cc

Issue 1129863003: Load ICC file for display color correction based on display product identifier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 29 matching lines...) Expand all
40 40
41 const base::FilePath::CharType kDeviceLocalAccountExtensionDir[] = 41 const base::FilePath::CharType kDeviceLocalAccountExtensionDir[] =
42 FILE_PATH_LITERAL("/var/cache/device_local_account_extensions"); 42 FILE_PATH_LITERAL("/var/cache/device_local_account_extensions");
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 kDeviceColorProfileDirectory[] =
51 FILE_PATH_LITERAL("/usr/share/color/icc");
52
50 bool PathProvider(int key, base::FilePath* result) { 53 bool PathProvider(int key, base::FilePath* result) {
51 switch (key) { 54 switch (key) {
52 case FILE_DEFAULT_APP_ORDER: 55 case FILE_DEFAULT_APP_ORDER:
53 *result = base::FilePath(kDefaultAppOrderFileName); 56 *result = base::FilePath(kDefaultAppOrderFileName);
54 break; 57 break;
55 case DIR_USER_POLICY_KEYS: 58 case DIR_USER_POLICY_KEYS:
56 *result = base::FilePath(kDefaultUserPolicyKeysDir); 59 *result = base::FilePath(kDefaultUserPolicyKeysDir);
57 break; 60 break;
58 case FILE_OWNER_KEY: 61 case FILE_OWNER_KEY:
59 *result = base::FilePath(kOwnerKeyFileName); 62 *result = base::FilePath(kOwnerKeyFileName);
(...skipping 12 matching lines...) Expand all
72 break; 75 break;
73 case DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS: 76 case DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS:
74 *result = base::FilePath(kDeviceLocalAccountExtensionDir); 77 *result = base::FilePath(kDeviceLocalAccountExtensionDir);
75 break; 78 break;
76 case DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA: 79 case DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA:
77 *result = base::FilePath(kDeviceLocalAccountExternalDataDir); 80 *result = base::FilePath(kDeviceLocalAccountExternalDataDir);
78 break; 81 break;
79 case DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY: 82 case DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY:
80 *result = base::FilePath(kDeviceLocalAccountComponentPolicy); 83 *result = base::FilePath(kDeviceLocalAccountComponentPolicy);
81 break; 84 break;
85 case DIR_DEVICE_COLOR_CALIBRATION_PROFILES:
86 *result = base::FilePath(kDeviceColorProfileDirectory);
82 default: 87 default:
83 return false; 88 return false;
84 } 89 }
85 return true; 90 return true;
86 } 91 }
87 92
88 } // namespace 93 } // namespace
89 94
90 void RegisterPathProvider() { 95 void RegisterPathProvider() {
91 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 96 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
(...skipping 29 matching lines...) Expand all
121 parent.AppendASCII("stub_device_local_account_extensions")); 126 parent.AppendASCII("stub_device_local_account_extensions"));
122 PathService::Override( 127 PathService::Override(
123 DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA, 128 DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA,
124 parent.AppendASCII("stub_device_local_account_external_data")); 129 parent.AppendASCII("stub_device_local_account_external_data"));
125 PathService::Override( 130 PathService::Override(
126 DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY, 131 DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY,
127 parent.AppendASCII("stub_device_local_account_component_policy")); 132 parent.AppendASCII("stub_device_local_account_component_policy"));
128 } 133 }
129 134
130 } // namespace chromeos 135 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698