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

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: Remove success paramter and add a todo 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 return false; 360 return false;
361 cur = cur.Append(FILE_PATH_LITERAL("resources")) 361 cur = cur.Append(FILE_PATH_LITERAL("resources"))
362 .Append(FILE_PATH_LITERAL("extension")); 362 .Append(FILE_PATH_LITERAL("extension"));
363 break; 363 break;
364 #if defined(OS_CHROMEOS) 364 #if defined(OS_CHROMEOS)
365 case chrome::DIR_CHROMEOS_WALLPAPERS: 365 case chrome::DIR_CHROMEOS_WALLPAPERS:
366 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 366 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
367 return false; 367 return false;
368 cur = cur.Append(FILE_PATH_LITERAL("wallpapers")); 368 cur = cur.Append(FILE_PATH_LITERAL("wallpapers"));
369 break; 369 break;
370 case chrome::DIR_CHROMEOS_WALLPAPER_THUMBNAILS:
371 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
372 return false;
373 cur = cur.Append(FILE_PATH_LITERAL("wallpaper_thumbnails"));
374 break;
370 case chrome::FILE_DEFAULT_APP_ORDER: 375 case chrome::FILE_DEFAULT_APP_ORDER:
371 cur = FilePath(FILE_PATH_LITERAL(kDefaultAppOrderFileName)); 376 cur = FilePath(FILE_PATH_LITERAL(kDefaultAppOrderFileName));
372 break; 377 break;
373 #endif 378 #endif
374 // The following are only valid in the development environment, and 379 // The following are only valid in the development environment, and
375 // will fail if executed from an installed executable (because the 380 // will fail if executed from an installed executable (because the
376 // generated path won't exist). 381 // generated path won't exist).
377 case chrome::DIR_GEN_TEST_DATA: 382 case chrome::DIR_GEN_TEST_DATA:
378 if (!PathService::Get(base::DIR_MODULE, &cur)) 383 if (!PathService::Get(base::DIR_MODULE, &cur))
379 return false; 384 return false;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 return true; 483 return true;
479 } 484 }
480 485
481 // This cannot be done as a static initializer sadly since Visual Studio will 486 // This cannot be done as a static initializer sadly since Visual Studio will
482 // eliminate this object file if there is no direct entry point into it. 487 // eliminate this object file if there is no direct entry point into it.
483 void RegisterPathProvider() { 488 void RegisterPathProvider() {
484 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 489 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
485 } 490 }
486 491
487 } // namespace chrome 492 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698