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

Issue 11348215: Make wallpaper picker manifest and thumbnails available when offline. (Closed)

Created:
8 years, 1 month ago by bshe
Modified:
8 years ago
CC:
chromium-reviews, nkostylev+watch_chromium.org, Aaron Boodman, arv (Not doing code reviews), oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=171011

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : nit #

Patch Set 5 : #

Patch Set 6 : Comment nits #

Total comments: 33

Patch Set 7 : #

Patch Set 8 : nit #

Patch Set 9 : rebase #

Patch Set 10 : Flackr's review #

Patch Set 11 : Remove success paramter and add a todo #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+402 lines, -91 lines) Patch
M chrome/browser/chromeos/extensions/wallpaper_private_api.h View 1 2 3 4 5 6 1 chunk +61 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/extensions/wallpaper_private_api.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +174 lines, -34 lines 1 comment Download
M chrome/browser/extensions/extension_function_registry.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +25 lines, -8 lines 0 comments Download
M chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js View 1 2 3 4 5 6 7 8 9 10 4 chunks +28 lines, -11 lines 0 comments Download
M chrome/browser/resources/chromeos/wallpaper_manager/manifest.json View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_paths.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_paths.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/wallpaper_private.json View 1 2 3 4 5 6 7 8 9 10 1 chunk +51 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/wallpaper_manager/test.js View 1 2 3 4 5 6 7 8 9 10 3 chunks +53 lines, -38 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
bshe
Hi Rob. This CL should make wallpaper picker manifest and thumbnails available when offline. Could ...
8 years, 1 month ago (2012-11-23 20:00:12 UTC) #1
bshe
+miket for extensions/* Thanks!
8 years ago (2012-11-26 22:14:38 UTC) #2
flackr
https://codereview.chromium.org/11348215/diff/19/chrome/browser/chromeos/extensions/wallpaper_private_api.cc File chrome/browser/chromeos/extensions/wallpaper_private_api.cc (right): https://codereview.chromium.org/11348215/diff/19/chrome/browser/chromeos/extensions/wallpaper_private_api.cc#newcode456 chrome/browser/chromeos/extensions/wallpaper_private_api.cc:456: SetError("Failed to create wallpaper thumbnails directory."); Not localized, is ...
8 years ago (2012-11-27 22:04:36 UTC) #3
miket_OOO
extensions LGTM but please see comments. https://codereview.chromium.org/11348215/diff/19/chrome/browser/chromeos/extensions/wallpaper_private_api.cc File chrome/browser/chromeos/extensions/wallpaper_private_api.cc (right): https://codereview.chromium.org/11348215/diff/19/chrome/browser/chromeos/extensions/wallpaper_private_api.cc#newcode438 chrome/browser/chromeos/extensions/wallpaper_private_api.cc:438: if (args_ == ...
8 years ago (2012-11-28 00:17:19 UTC) #4
bshe
Thanks for review. I have addressed all comments. And I also improved the error message ...
8 years ago (2012-11-28 18:54:25 UTC) #5
flackr
https://codereview.chromium.org/11348215/diff/19/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js File chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js (right): https://codereview.chromium.org/11348215/diff/19/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js#newcode57 chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js:57: var blob = new Blob([data]); On 2012/11/28 18:54:26, bshe ...
8 years ago (2012-12-03 19:02:29 UTC) #6
bshe
Done. Thanks for review. https://codereview.chromium.org/11348215/diff/19/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js File chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js (right): https://codereview.chromium.org/11348215/diff/19/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js#newcode57 chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js:57: var blob = new Blob([data]); ...
8 years ago (2012-12-03 19:39:32 UTC) #7
flackr
LGTM https://codereview.chromium.org/11348215/diff/19/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js File chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js (right): https://codereview.chromium.org/11348215/diff/19/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js#newcode130 chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js:130: this.onLoadManifestFailed_.bind(this)); On 2012/11/28 18:54:26, bshe wrote: > Good ...
8 years ago (2012-12-03 20:03:45 UTC) #8
bshe
Thanks for review! +jhawkins for owners (just added a new chrome path for wallpaper thumbnails): ...
8 years ago (2012-12-03 22:18:00 UTC) #9
James Hawkins
lgtm
8 years ago (2012-12-04 00:38:21 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bshe@chromium.org/11348215/6015
8 years ago (2012-12-04 16:23:04 UTC) #11
commit-bot: I haz the power
Change committed as 171011
8 years ago (2012-12-04 18:50:57 UTC) #12
Nico
8 years ago (2012-12-04 19:34:44 UTC) #13
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/11348215/diff/6015/chrome/browser/chro...
File chrome/browser/chromeos/extensions/wallpaper_private_api.cc (right):

https://chromiumcodereview.appspot.com/11348215/diff/6015/chrome/browser/chro...
chrome/browser/chromeos/extensions/wallpaper_private_api.cc:93:
(file_util::ReadFileToString(file_path, data) != -1);
ReadFileToString returns a bool, not an int. I sent
https://codereview.chromium.org/11419315/ to fix this.

Powered by Google App Engine
This is Rietveld 408576698