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

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

Issue 11348215: Make wallpaper picker manifest and thumbnails available when offline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment nits Created 8 years 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 return false; 369 return false;
370 cur = cur.Append(FILE_PATH_LITERAL("resources")) 370 cur = cur.Append(FILE_PATH_LITERAL("resources"))
371 .Append(FILE_PATH_LITERAL("extension")); 371 .Append(FILE_PATH_LITERAL("extension"));
372 break; 372 break;
373 #if defined(OS_CHROMEOS) 373 #if defined(OS_CHROMEOS)
374 case chrome::DIR_CHROMEOS_WALLPAPERS: 374 case chrome::DIR_CHROMEOS_WALLPAPERS:
375 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 375 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
376 return false; 376 return false;
377 cur = cur.Append(FILE_PATH_LITERAL("wallpapers")); 377 cur = cur.Append(FILE_PATH_LITERAL("wallpapers"));
378 break; 378 break;
379 case chrome::DIR_CHROMEOS_WALLPAPER_THUMBNAILS:
380 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
381 return false;
382 cur = cur.Append(FILE_PATH_LITERAL("wallpaper_thumbnails"));
383 break;
379 case chrome::FILE_DEFAULT_APP_ORDER: 384 case chrome::FILE_DEFAULT_APP_ORDER:
380 cur = FilePath(FILE_PATH_LITERAL(kDefaultAppOrderFileName)); 385 cur = FilePath(FILE_PATH_LITERAL(kDefaultAppOrderFileName));
381 break; 386 break;
382 #endif 387 #endif
383 // The following are only valid in the development environment, and 388 // The following are only valid in the development environment, and
384 // will fail if executed from an installed executable (because the 389 // will fail if executed from an installed executable (because the
385 // generated path won't exist). 390 // generated path won't exist).
386 case chrome::DIR_GEN_TEST_DATA: 391 case chrome::DIR_GEN_TEST_DATA:
387 if (!PathService::Get(base::DIR_MODULE, &cur)) 392 if (!PathService::Get(base::DIR_MODULE, &cur))
388 return false; 393 return false;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 return true; 492 return true;
488 } 493 }
489 494
490 // This cannot be done as a static initializer sadly since Visual Studio will 495 // This cannot be done as a static initializer sadly since Visual Studio will
491 // eliminate this object file if there is no direct entry point into it. 496 // eliminate this object file if there is no direct entry point into it.
492 void RegisterPathProvider() { 497 void RegisterPathProvider() {
493 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 498 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
494 } 499 }
495 500
496 } // namespace chrome 501 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698