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

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

Issue 10094010: Cleanup in policy code, removed some dead code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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;
306 #endif 303 #endif
307 // The following are only valid in the development environment, and 304 // The following are only valid in the development environment, and
308 // will fail if executed from an installed executable (because the 305 // will fail if executed from an installed executable (because the
309 // generated path won't exist). 306 // generated path won't exist).
310 case chrome::DIR_GEN_TEST_DATA: 307 case chrome::DIR_GEN_TEST_DATA:
311 if (!PathService::Get(base::DIR_MODULE, &cur)) 308 if (!PathService::Get(base::DIR_MODULE, &cur))
312 return false; 309 return false;
313 cur = cur.Append(FILE_PATH_LITERAL("test_data")); 310 cur = cur.Append(FILE_PATH_LITERAL("test_data"));
314 if (!file_util::PathExists(cur)) // We don't want to create this. 311 if (!file_util::PathExists(cur)) // We don't want to create this.
315 return false; 312 return false;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 return true; 402 return true;
406 } 403 }
407 404
408 // This cannot be done as a static initializer sadly since Visual Studio will 405 // This cannot be done as a static initializer sadly since Visual Studio will
409 // eliminate this object file if there is no direct entry point into it. 406 // eliminate this object file if there is no direct entry point into it.
410 void RegisterPathProvider() { 407 void RegisterPathProvider() {
411 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 408 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
412 } 409 }
413 410
414 } // namespace chrome 411 } // 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