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

Side by Side Diff: chrome/common/chrome_paths.cc

Issue 7233006: Store/Retrieve CrOS user policy in session_manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | « chrome/common/chrome_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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/common/chrome_paths.h" 5 #include "chrome/common/chrome_paths.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/bundle_locations.h" 10 #include "base/mac/bundle_locations.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 return false; 293 return false;
294 cur = cur.Append(FILE_PATH_LITERAL("resources.pak")); 294 cur = cur.Append(FILE_PATH_LITERAL("resources.pak"));
295 break; 295 break;
296 #if defined(OS_CHROMEOS) 296 #if defined(OS_CHROMEOS)
297 case chrome::FILE_CHROMEOS_API: 297 case chrome::FILE_CHROMEOS_API:
298 if (!PathService::Get(base::DIR_MODULE, &cur)) 298 if (!PathService::Get(base::DIR_MODULE, &cur))
299 return false; 299 return false;
300 cur = cur.Append(FILE_PATH_LITERAL("chromeos")); 300 cur = cur.Append(FILE_PATH_LITERAL("chromeos"));
301 cur = cur.Append(FILE_PATH_LITERAL("libcros.so")); 301 cur = cur.Append(FILE_PATH_LITERAL("libcros.so"));
302 break; 302 break;
303 case chrome::DIR_USER_POLICY:
304 cur = FilePath(FILE_PATH_LITERAL("/home/chronos/root/enterprise"));
305 break;
303 #endif 306 #endif
304 // The following are only valid in the development environment, and 307 // The following are only valid in the development environment, and
305 // will fail if executed from an installed executable (because the 308 // will fail if executed from an installed executable (because the
306 // generated path won't exist). 309 // generated path won't exist).
307 case chrome::DIR_GEN_TEST_DATA: 310 case chrome::DIR_GEN_TEST_DATA:
308 if (!PathService::Get(base::DIR_MODULE, &cur)) 311 if (!PathService::Get(base::DIR_MODULE, &cur))
309 return false; 312 return false;
310 cur = cur.Append(FILE_PATH_LITERAL("test_data")); 313 cur = cur.Append(FILE_PATH_LITERAL("test_data"));
311 if (!file_util::PathExists(cur)) // We don't want to create this. 314 if (!file_util::PathExists(cur)) // We don't want to create this.
312 return false; 315 return false;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 return true; 405 return true;
403 } 406 }
404 407
405 // This cannot be done as a static initializer sadly since Visual Studio will 408 // This cannot be done as a static initializer sadly since Visual Studio will
406 // eliminate this object file if there is no direct entry point into it. 409 // eliminate this object file if there is no direct entry point into it.
407 void RegisterPathProvider() { 410 void RegisterPathProvider() {
408 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 411 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
409 } 412 }
410 413
411 } // namespace chrome 414 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698