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

Side by Side Diff: chromeos/chromeos_paths.cc

Issue 1301323005: Implement kiosk multiple apps feature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits. Created 5 years, 3 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 kDeviceExtensionLocalCache[] =
51 FILE_PATH_LITERAL("/var/cache/external_cache");
52
50 const base::FilePath::CharType kDeviceColorProfileDirectory[] = 53 const base::FilePath::CharType kDeviceColorProfileDirectory[] =
51 FILE_PATH_LITERAL("/usr/share/color/icc"); 54 FILE_PATH_LITERAL("/usr/share/color/icc");
52 55
53 bool PathProvider(int key, base::FilePath* result) { 56 bool PathProvider(int key, base::FilePath* result) {
54 switch (key) { 57 switch (key) {
55 case FILE_DEFAULT_APP_ORDER: 58 case FILE_DEFAULT_APP_ORDER:
56 *result = base::FilePath(kDefaultAppOrderFileName); 59 *result = base::FilePath(kDefaultAppOrderFileName);
57 break; 60 break;
58 case DIR_USER_POLICY_KEYS: 61 case DIR_USER_POLICY_KEYS:
59 *result = base::FilePath(kDefaultUserPolicyKeysDir); 62 *result = base::FilePath(kDefaultUserPolicyKeysDir);
(...skipping 18 matching lines...) Expand all
78 break; 81 break;
79 case DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA: 82 case DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA:
80 *result = base::FilePath(kDeviceLocalAccountExternalDataDir); 83 *result = base::FilePath(kDeviceLocalAccountExternalDataDir);
81 break; 84 break;
82 case DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY: 85 case DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY:
83 *result = base::FilePath(kDeviceLocalAccountComponentPolicy); 86 *result = base::FilePath(kDeviceLocalAccountComponentPolicy);
84 break; 87 break;
85 case DIR_DEVICE_COLOR_CALIBRATION_PROFILES: 88 case DIR_DEVICE_COLOR_CALIBRATION_PROFILES:
86 *result = base::FilePath(kDeviceColorProfileDirectory); 89 *result = base::FilePath(kDeviceColorProfileDirectory);
87 break; 90 break;
91 case DIR_DEVICE_EXTENSION_LOCAL_CACHE:
92 *result = base::FilePath(kDeviceExtensionLocalCache);
93 break;
88 default: 94 default:
89 return false; 95 return false;
90 } 96 }
91 return true; 97 return true;
92 } 98 }
93 99
94 } // namespace 100 } // namespace
95 101
96 void RegisterPathProvider() { 102 void RegisterPathProvider() {
97 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 103 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
(...skipping 26 matching lines...) Expand all
124 create); 130 create);
125 PathService::Override( 131 PathService::Override(
126 DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, 132 DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS,
127 parent.AppendASCII("stub_device_local_account_extensions")); 133 parent.AppendASCII("stub_device_local_account_extensions"));
128 PathService::Override( 134 PathService::Override(
129 DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA, 135 DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA,
130 parent.AppendASCII("stub_device_local_account_external_data")); 136 parent.AppendASCII("stub_device_local_account_external_data"));
131 PathService::Override( 137 PathService::Override(
132 DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY, 138 DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY,
133 parent.AppendASCII("stub_device_local_account_component_policy")); 139 parent.AppendASCII("stub_device_local_account_component_policy"));
140 PathService::Override(
141 DIR_DEVICE_EXTENSION_LOCAL_CACHE,
142 parent.AppendASCII("stub_device_local_extension_cache"));
134 } 143 }
135 144
136 } // namespace chromeos 145 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698