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

Issue 208273005: If customization includes default wallpaper, download and apply it. (Closed)

Created:
6 years, 9 months ago by Alexander Alekseev
Modified:
6 years, 8 months ago
CC:
chromium-reviews, sadrul, nkostylev+watch_chromium.org, ben+ash_chromium.org, oshima+watch_chromium.org, kalyank, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

If customization includes default wallpaper, download and apply it. BUG=348136 TEST=manual

Patch Set 1 #

Total comments: 14

Patch Set 2 : Add ShellDelegate::*CustomizedWallpaper* #

Patch Set 3 : Do not analyze command-line in SetDefaultWallpaper(). #

Patch Set 4 : Rebase. #

Total comments: 2

Patch Set 5 : Start customization manifest fetch on EULA accepted. Never re-fetch wallpaper. #

Total comments: 56

Patch Set 6 : Remove modifications of ShellDelegate. #

Patch Set 7 : Unused code is removed. #

Patch Set 8 : Removed DefaultWallpaperFileIsAlreadyLoadingOrLoaded. #

Patch Set 9 : Moved all wallpaper paths from DBC to WallpaperManager. #

Total comments: 2

Patch Set 10 : Fix comment. #

Patch Set 11 : Add DBC::IsUsingDefaultWallpaper(); Restart wallpaper fetch on device restart. #

Total comments: 34

Patch Set 12 : Use sandboxed ImageDecoder to read downloaded image file. #

Patch Set 13 : Deleted DBC::SetDefaultWallpaper. #

Total comments: 42

Patch Set 14 : Update after-review. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1227 lines, -603 lines) Patch
M ash/accelerators/debug_commands.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -3 lines 0 comments Download
M ash/desktop_background/desktop_background_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +7 lines, -50 lines 0 comments Download
M ash/desktop_background/desktop_background_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +8 lines, -201 lines 0 comments Download
M ash/desktop_background/desktop_background_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 12 chunks +4 lines, -272 lines 0 comments Download
M ash/test/test_user_wallpaper_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/customization_document.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +27 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/customization_document.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +144 lines, -1 line 0 comments Download
A chrome/browser/chromeos/customization_wallpaper_downloader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +89 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/customization_wallpaper_downloader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +189 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/extensions/wallpaper_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/chromeos/extensions/wallpaper_private_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/login_location_monitor.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/login/wallpaper_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +113 lines, -8 lines 0 comments Download
M chrome/browser/chromeos/login/wallpaper_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 16 chunks +381 lines, -27 lines 0 comments Download
M chrome/browser/chromeos/login/wallpaper_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +244 lines, -36 lines 0 comments Download
M chrome/browser/chromeos/login/wizard_controller.cc View 1 2 3 4 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser_chromeos.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (0 generated)
Alexander Alekseev
Please review: mnissler@ : pref_names.* bshe@ : wallpaper_manager, desktop_background_controller, dpolukhin@, nkostylev@: all ;-) a) Constraints: ...
6 years, 9 months ago (2014-03-24 16:10:24 UTC) #1
Nikita (slow)
On 2014/03/24 16:10:24, alemate wrote: > bshe@ : wallpaper_manager, desktop_background_controller, +derat@ as well > bshe@: ...
6 years, 9 months ago (2014-03-24 16:15:22 UTC) #2
Daniel Erat
https://codereview.chromium.org/208273005/diff/1/ash/desktop_background/desktop_background_controller.cc File ash/desktop_background/desktop_background_controller.cc (right): https://codereview.chromium.org/208273005/diff/1/ash/desktop_background/desktop_background_controller.cc#newcode37 ash/desktop_background/desktop_background_controller.cc:37: #include "chrome/browser/chromeos/login/wallpaper_manager.h" ash isn't allowed to depend on chrome. ...
6 years, 9 months ago (2014-03-24 16:25:48 UTC) #3
Alexander Alekseev
https://codereview.chromium.org/208273005/diff/1/ash/desktop_background/desktop_background_controller.cc File ash/desktop_background/desktop_background_controller.cc (right): https://codereview.chromium.org/208273005/diff/1/ash/desktop_background/desktop_background_controller.cc#newcode37 ash/desktop_background/desktop_background_controller.cc:37: #include "chrome/browser/chromeos/login/wallpaper_manager.h" On 2014/03/24 16:25:48, Daniel Erat wrote: > ...
6 years, 9 months ago (2014-03-24 17:33:42 UTC) #4
Daniel Erat
https://codereview.chromium.org/208273005/diff/1/ash/desktop_background/desktop_background_controller.cc File ash/desktop_background/desktop_background_controller.cc (right): https://codereview.chromium.org/208273005/diff/1/ash/desktop_background/desktop_background_controller.cc#newcode401 ash/desktop_background/desktop_background_controller.cc:401: const base::FilePath& image_file) const { On 2014/03/24 17:33:43, alemate ...
6 years, 9 months ago (2014-03-24 19:19:42 UTC) #5
Daniel Erat
https://codereview.chromium.org/208273005/diff/50001/ash/desktop_background/desktop_background_controller.cc File ash/desktop_background/desktop_background_controller.cc (right): https://codereview.chromium.org/208273005/diff/50001/ash/desktop_background/desktop_background_controller.cc#newcode238 ash/desktop_background/desktop_background_controller.cc:238: ShellDelegate* delegate = ash::Shell::GetInstance()->delegate(); i still don't understand why ...
6 years, 9 months ago (2014-03-24 19:24:40 UTC) #6
Alexander Alekseev
https://codereview.chromium.org/208273005/diff/50001/ash/desktop_background/desktop_background_controller.cc File ash/desktop_background/desktop_background_controller.cc (right): https://codereview.chromium.org/208273005/diff/50001/ash/desktop_background/desktop_background_controller.cc#newcode238 ash/desktop_background/desktop_background_controller.cc:238: ShellDelegate* delegate = ash::Shell::GetInstance()->delegate(); On 2014/03/24 19:24:40, Daniel Erat ...
6 years, 9 months ago (2014-03-24 19:47:54 UTC) #7
Alexander Alekseev
https://codereview.chromium.org/208273005/diff/1/ash/desktop_background/desktop_background_controller.cc File ash/desktop_background/desktop_background_controller.cc (right): https://codereview.chromium.org/208273005/diff/1/ash/desktop_background/desktop_background_controller.cc#newcode401 ash/desktop_background/desktop_background_controller.cc:401: const base::FilePath& image_file) const { On 2014/03/24 19:19:43, Daniel ...
6 years, 9 months ago (2014-03-24 19:52:57 UTC) #8
Daniel Erat
On 2014/03/24 19:52:57, alemate wrote: > https://codereview.chromium.org/208273005/diff/1/ash/desktop_background/desktop_background_controller.cc > File ash/desktop_background/desktop_background_controller.cc (right): > > https://codereview.chromium.org/208273005/diff/1/ash/desktop_background/desktop_background_controller.cc#newcode401 > ...
6 years, 9 months ago (2014-03-24 20:23:01 UTC) #9
Mattias Nissler (ping if slow)
pref_names.{cc,h} LGTM, but please have somebody take another look after you addressed my other comments. ...
6 years, 9 months ago (2014-03-24 20:38:53 UTC) #10
bshe
https://codereview.chromium.org/208273005/diff/60019/ash/desktop_background/desktop_background_controller.cc File ash/desktop_background/desktop_background_controller.cc (right): https://codereview.chromium.org/208273005/diff/60019/ash/desktop_background/desktop_background_controller.cc#newcode250 ash/desktop_background/desktop_background_controller.cc:250: bool DesktopBackgroundController::SetDefaultWallpaper(bool is_guest) { SetDefaultWallpaper is only called in ...
6 years, 9 months ago (2014-03-24 21:30:49 UTC) #11
Daniel Erat
https://codereview.chromium.org/210313004/ is along the lines of what I was thinking of to make DesktopBackgroundController support ...
6 years, 9 months ago (2014-03-24 22:42:50 UTC) #12
Alexander Alekseev
On 2014/03/24 22:42:50, Daniel Erat wrote: > https://codereview.chromium.org/210313004/ is along the lines of what I ...
6 years, 9 months ago (2014-03-24 23:04:23 UTC) #13
Alexander Alekseev
On 2014/03/24 22:42:50, Daniel Erat wrote: > https://codereview.chromium.org/210313004/ is along the lines of what I ...
6 years, 9 months ago (2014-03-24 23:05:56 UTC) #14
Daniel Erat
On 2014/03/24 23:05:56, alemate wrote: > On 2014/03/24 22:42:50, Daniel Erat wrote: > > https://codereview.chromium.org/210313004/ ...
6 years, 9 months ago (2014-03-24 23:15:01 UTC) #15
Alexander Alekseev
On 2014/03/24 23:15:01, Daniel Erat wrote: > On 2014/03/24 23:05:56, alemate wrote: > > On ...
6 years, 9 months ago (2014-03-25 00:15:46 UTC) #16
Daniel Erat
On 2014/03/25 00:15:46, alemate wrote: > On 2014/03/24 23:15:01, Daniel Erat wrote: > > On ...
6 years, 9 months ago (2014-03-25 00:39:02 UTC) #17
Alexander Alekseev
On 2014/03/25 00:39:02, Daniel Erat wrote: > On 2014/03/25 00:15:46, alemate wrote: > > On ...
6 years, 9 months ago (2014-03-25 01:25:01 UTC) #18
Daniel Erat
On 2014/03/25 01:25:01, alemate wrote: > On 2014/03/25 00:39:02, Daniel Erat wrote: > > On ...
6 years, 9 months ago (2014-03-25 02:31:43 UTC) #19
Dmitry Polukhin
Different users may have different customizations because we by design download and apply customizations when ...
6 years, 9 months ago (2014-03-25 02:43:09 UTC) #20
Alexander Alekseev
I've removed modifications of ShellDelegate. Default wallpaper paths are initialized in WallpaperManager::InitializeWallpaper(). Please review again. ...
6 years, 9 months ago (2014-03-25 14:38:28 UTC) #21
Daniel Erat
did you see the long comment that i wrote suggesting what seems like a much-cleaner ...
6 years, 9 months ago (2014-03-25 15:36:26 UTC) #22
Alexander Alekseev
On 2014/03/25 02:31:43, Daniel Erat wrote: > On 2014/03/25 01:25:01, alemate wrote: > > On ...
6 years, 9 months ago (2014-03-25 15:51:22 UTC) #23
Alexander Alekseev
I have removed DesktopBackgroundController::DefaultWallpaperFileIsAlreadyLoadingOrLoaded(). Would you accept this change?
6 years, 9 months ago (2014-03-25 15:53:02 UTC) #24
Daniel Erat
On 2014/03/25 15:53:02, alemate wrote: > I have removed > DesktopBackgroundController::DefaultWallpaperFileIsAlreadyLoadingOrLoaded(). > Would you accept ...
6 years, 9 months ago (2014-03-25 15:56:09 UTC) #25
Alexander Alekseev
On 2014/03/25 15:36:26, Daniel Erat wrote: > did you see the long comment that i ...
6 years, 9 months ago (2014-03-25 15:58:43 UTC) #26
Daniel Erat
On 2014/03/25 15:58:43, alemate wrote: > On 2014/03/25 15:36:26, Daniel Erat wrote: > > did ...
6 years, 9 months ago (2014-03-25 16:02:50 UTC) #27
Alexander Alekseev
I've moved all wallpaper paths to WallpaperManager. Please review. (I've added back public DefaultWallpaperFileIsAlreadyLoadingOrLoaded(path) to ...
6 years, 9 months ago (2014-03-25 18:22:58 UTC) #28
Daniel Erat
https://codereview.chromium.org/208273005/diff/220001/ash/desktop_background/desktop_background_controller.cc File ash/desktop_background/desktop_background_controller.cc (right): https://codereview.chromium.org/208273005/diff/220001/ash/desktop_background/desktop_background_controller.cc#newcode324 ash/desktop_background/desktop_background_controller.cc:324: bool DesktopBackgroundController::DefaultWallpaperFileIsAlreadyLoadingOrLoaded( i'm sorry, but i still don't understand ...
6 years, 9 months ago (2014-03-25 18:32:54 UTC) #29
Daniel Erat
6 years, 9 months ago (2014-03-25 18:34:02 UTC) #30
Alexander Alekseev
https://codereview.chromium.org/208273005/diff/220001/ash/desktop_background/desktop_background_controller.cc File ash/desktop_background/desktop_background_controller.cc (right): https://codereview.chromium.org/208273005/diff/220001/ash/desktop_background/desktop_background_controller.cc#newcode324 ash/desktop_background/desktop_background_controller.cc:324: bool DesktopBackgroundController::DefaultWallpaperFileIsAlreadyLoadingOrLoaded( On 2014/03/25 18:32:54, Daniel Erat wrote: > ...
6 years, 9 months ago (2014-03-25 19:09:33 UTC) #31
Daniel Erat
On 2014/03/25 19:09:33, alemate wrote: > https://codereview.chromium.org/208273005/diff/220001/ash/desktop_background/desktop_background_controller.cc > File ash/desktop_background/desktop_background_controller.cc (right): > > https://codereview.chromium.org/208273005/diff/220001/ash/desktop_background/desktop_background_controller.cc#newcode324 > ...
6 years, 9 months ago (2014-03-25 19:55:01 UTC) #32
Alexander Alekseev
On 2014/03/25 19:55:01, Daniel Erat wrote: > On 2014/03/25 19:09:33, alemate wrote: > > > ...
6 years, 9 months ago (2014-03-25 20:08:31 UTC) #33
Daniel Erat
On 2014/03/25 20:08:31, alemate wrote: > On 2014/03/25 19:55:01, Daniel Erat wrote: > > On ...
6 years, 9 months ago (2014-03-25 20:12:28 UTC) #34
Daniel Erat
On 2014/03/25 20:12:28, Daniel Erat wrote: > On 2014/03/25 20:08:31, alemate wrote: > > On ...
6 years, 9 months ago (2014-03-25 20:18:50 UTC) #35
Alexander Alekseev
On 2014/03/25 20:12:28, Daniel Erat wrote: > On 2014/03/25 20:08:31, alemate wrote: > > On ...
6 years, 9 months ago (2014-03-25 20:27:15 UTC) #36
Daniel Erat
On 2014/03/25 20:27:15, alemate wrote: > On 2014/03/25 20:12:28, Daniel Erat wrote: > > On ...
6 years, 9 months ago (2014-03-25 20:52:30 UTC) #37
Alexander Alekseev
I've added DesktopBackgroundController::IsUsingDefaultWallpaper(). (It works, thank you, Daniel!) I've also added "retry failed wallpaper fetch ...
6 years, 9 months ago (2014-03-25 21:27:19 UTC) #38
Daniel Erat
thanks! the ash changes look fine to me now. i glanced at the c/b/c/login code ...
6 years, 9 months ago (2014-03-25 21:58:28 UTC) #39
Dmitry Polukhin
The URL comes from customization manifest that is fetched over HTTPS from Google server. So ...
6 years, 9 months ago (2014-03-25 22:06:51 UTC) #40
Daniel Erat
On 2014/03/25 22:06:51, Dmitry Polukhin wrote: > The URL comes from customization manifest that is ...
6 years, 9 months ago (2014-03-25 22:11:00 UTC) #41
Alexander Alekseev
I've removed DBC::SetDefaultWallpaper. Please review. https://codereview.chromium.org/208273005/diff/460001/ash/desktop_background/desktop_background_controller_unittest.cc File ash/desktop_background/desktop_background_controller_unittest.cc (right): https://codereview.chromium.org/208273005/diff/460001/ash/desktop_background/desktop_background_controller_unittest.cc#newcode231 ash/desktop_background/desktop_background_controller_unittest.cc:231: void WriteWallpapersAndSetFlags() { On ...
6 years, 8 months ago (2014-03-27 00:28:36 UTC) #42
Daniel Erat
https://codereview.chromium.org/208273005/diff/460001/chrome/browser/chromeos/customization_wallpaper_downloader.cc File chrome/browser/chromeos/customization_wallpaper_downloader.cc (right): https://codereview.chromium.org/208273005/diff/460001/chrome/browser/chromeos/customization_wallpaper_downloader.cc#newcode100 chrome/browser/chromeos/customization_wallpaper_downloader.cc:100: DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); On 2014/03/27 00:28:37, alemate wrote: > On 2014/03/25 ...
6 years, 8 months ago (2014-03-27 01:22:30 UTC) #43
Daniel Erat
here are some initial comments; i didn't make it very far through c/b/chromeos. this is ...
6 years, 8 months ago (2014-03-27 01:45:49 UTC) #44
Daniel Erat
On 2014/03/27 01:45:49, Daniel Erat wrote: > here are some initial comments; i didn't make ...
6 years, 8 months ago (2014-03-27 01:47:24 UTC) #45
Dmitry Polukhin
https://codereview.chromium.org/208273005/diff/670001/chrome/browser/chromeos/customization_document.cc File chrome/browser/chromeos/customization_document.cc (right): https://codereview.chromium.org/208273005/diff/670001/chrome/browser/chromeos/customization_document.cc#newcode72 chrome/browser/chromeos/customization_document.cc:72: const char kCustomizationDefaultWallpaperDir[] = "customization/"; Please add comment, also ...
6 years, 8 months ago (2014-03-27 04:36:31 UTC) #46
Dmitry Polukhin
https://codereview.chromium.org/208273005/diff/670001/chrome/browser/chromeos/login/wizard_controller.cc File chrome/browser/chromeos/login/wizard_controller.cc (right): https://codereview.chromium.org/208273005/diff/670001/chrome/browser/chromeos/login/wizard_controller.cc#newcode320 chrome/browser/chromeos/login/wizard_controller.cc:320: ServicesCustomizationDocument::GetInstance()->StartFetching(); It will always fetch new customization manifest even ...
6 years, 8 months ago (2014-03-27 04:46:10 UTC) #47
Alexander Alekseev
I'm ready to split this into two CL: - DBC + WallpaperManager : move all ...
6 years, 8 months ago (2014-03-31 14:15:39 UTC) #48
Daniel Erat
splitting the CL that way sounds good. https://codereview.chromium.org/208273005/diff/670001/chrome/browser/chromeos/customization_document.cc File chrome/browser/chromeos/customization_document.cc (right): https://codereview.chromium.org/208273005/diff/670001/chrome/browser/chromeos/customization_document.cc#newcode577 chrome/browser/chromeos/customization_document.cc:577: const GURL& ...
6 years, 8 months ago (2014-03-31 14:22:14 UTC) #49
bshe
On 2014/03/31 14:22:14, Daniel Erat wrote: > splitting the CL that way sounds good. > ...
6 years, 8 months ago (2014-03-31 14:26:09 UTC) #50
Alexander Alekseev
6 years, 8 months ago (2014-03-31 15:39:14 UTC) #51
https://codereview.chromium.org/208273005/diff/670001/chrome/browser/chromeos...
File chrome/browser/chromeos/customization_document.cc (right):

https://codereview.chromium.org/208273005/diff/670001/chrome/browser/chromeos...
chrome/browser/chromeos/customization_document.cc:577: const GURL&
wallpaper_url) {
On 2014/03/31 14:22:15, Daniel Erat wrote:
> On 2014/03/31 14:15:40, alemate wrote:
> > On 2014/03/27 01:45:50, Daniel Erat wrote:
> > > why does this need to be a static method?
> > 
> > It just doesn't require access to object. It doesn't need to be static.
> > Do you think I should still make it "normal" method?
> 
> if it doesn't need to be accessed outside of the class, just make it into a
> function in the anonymous namespace. this makes the header file smaller and is
> easier to maintain (since you don't need to maintain a separate method
signature
> in the header).

It's called from both this class and CustomizationWallpaperDownloader.

Powered by Google App Engine
This is Rietveld 408576698