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

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

Issue 10754014: Wallpaper manager backend APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux_chromeos compile error Created 8 years, 5 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
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/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 if (!PathService::Get(base::DIR_MODULE, &cur)) 318 if (!PathService::Get(base::DIR_MODULE, &cur))
319 return false; 319 return false;
320 cur = cur.Append(FILE_PATH_LITERAL("resources.pak")); 320 cur = cur.Append(FILE_PATH_LITERAL("resources.pak"));
321 break; 321 break;
322 case chrome::DIR_RESOURCES_EXTENSION: 322 case chrome::DIR_RESOURCES_EXTENSION:
323 if (!PathService::Get(base::DIR_MODULE, &cur)) 323 if (!PathService::Get(base::DIR_MODULE, &cur))
324 return false; 324 return false;
325 cur = cur.Append(FILE_PATH_LITERAL("resources")) 325 cur = cur.Append(FILE_PATH_LITERAL("resources"))
326 .Append(FILE_PATH_LITERAL("extension")); 326 .Append(FILE_PATH_LITERAL("extension"));
327 break; 327 break;
328 #if defined(OS_CHROMEOS)
329 case chrome::DIR_CHROMEOS_WALLPAPERS:
330 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
331 return false;
332 cur = cur.Append(FILE_PATH_LITERAL("wallpapers"));
333 break;
334 #endif
328 // The following are only valid in the development environment, and 335 // The following are only valid in the development environment, and
329 // will fail if executed from an installed executable (because the 336 // will fail if executed from an installed executable (because the
330 // generated path won't exist). 337 // generated path won't exist).
331 case chrome::DIR_GEN_TEST_DATA: 338 case chrome::DIR_GEN_TEST_DATA:
332 if (!PathService::Get(base::DIR_MODULE, &cur)) 339 if (!PathService::Get(base::DIR_MODULE, &cur))
333 return false; 340 return false;
334 cur = cur.Append(FILE_PATH_LITERAL("test_data")); 341 cur = cur.Append(FILE_PATH_LITERAL("test_data"));
335 if (!file_util::PathExists(cur)) // We don't want to create this. 342 if (!file_util::PathExists(cur)) // We don't want to create this.
336 return false; 343 return false;
337 break; 344 break;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 return true; 439 return true;
433 } 440 }
434 441
435 // This cannot be done as a static initializer sadly since Visual Studio will 442 // This cannot be done as a static initializer sadly since Visual Studio will
436 // eliminate this object file if there is no direct entry point into it. 443 // eliminate this object file if there is no direct entry point into it.
437 void RegisterPathProvider() { 444 void RegisterPathProvider() {
438 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 445 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
439 } 446 }
440 447
441 } // namespace chrome 448 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698