diff options
author | bshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-04 18:50:51 +0000 |
---|---|---|
committer | bshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-04 18:50:51 +0000 |
commit | 095d5ef2e2ecec063d2cb8a2616ae6ec5d3e463a (patch) | |
tree | 1ac415e569e0ae564c269f50147a2e63d2330340 /chrome/common/chrome_paths.cc | |
parent | c4d1d311656ee66c3294384f64055b360ddb9ffa (diff) | |
download | chromium_src-095d5ef2e2ecec063d2cb8a2616ae6ec5d3e463a.zip chromium_src-095d5ef2e2ecec063d2cb8a2616ae6ec5d3e463a.tar.gz chromium_src-095d5ef2e2ecec063d2cb8a2616ae6ec5d3e463a.tar.bz2 |
Make wallpaper picker manifest and thumbnails available when offline.
This CL did the following:
1. Save/update manifest in chrome.storage.local when user successfully
requested latest manifest from server. If user failed to get manifest
from server(offline or server error), fallback to the manifest saved
in chrome.storage.local last time.
2. Lazily saves all requested thumbnails to thumbnails directory. And
load from that directory when user open wallpaper picker next time. Note
that thumbnails are shared across user session. So after one user saved
thumbnails, all other users will directly use the thumbnails that saved
in thumbnail directory.
BUG=158668
Review URL: https://chromiumcodereview.appspot.com/11348215
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171011 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_paths.cc')
-rw-r--r-- | chrome/common/chrome_paths.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc index cef6b4d..36d4b8a 100644 --- a/chrome/common/chrome_paths.cc +++ b/chrome/common/chrome_paths.cc @@ -367,6 +367,11 @@ bool PathProvider(int key, FilePath* result) { return false; cur = cur.Append(FILE_PATH_LITERAL("wallpapers")); break; + case chrome::DIR_CHROMEOS_WALLPAPER_THUMBNAILS: + if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) + return false; + cur = cur.Append(FILE_PATH_LITERAL("wallpaper_thumbnails")); + break; case chrome::FILE_DEFAULT_APP_ORDER: cur = FilePath(FILE_PATH_LITERAL(kDefaultAppOrderFileName)); break; |