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

Issue 221873005: Some cleanup of WallpaperManager. (Closed)

Created:
6 years, 8 months ago by Thiemo Nagel
Modified:
6 years, 8 months ago
Reviewers:
Nikita (slow), oshima, bshe
CC:
chromium-reviews, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, oshima+watch_chromium.org, nkostylev+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@lkgr
Visibility:
Public.

Description

Some cleanup of WallpaperManager. * Add const, static and/or private in some places. * Integrate ProcessCustomWallpaper() into SetCustomWallpaper() to avoid PostTask() and deep copy of wallpaper in case it is not persistent. * Replace UserImage by gfx::ImageSkia in some places to simplify code and to avoid useless temporary objects. * Remove unused DAILY User::WallpaperType. * Remove unused GetOriginalWallpaperPathForUser(). * Replace SetLastSelectedUser() by direct member access. * Add initialization of WallpaperInfo.date that was missing in one case. * Rename all ImageSkia method parameters to "image" and all UserImage method parameters to "user_image" for consistency. * Rename ResizeWallpaper() to ResizeImage(). * Improve some comments. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266026

Patch Set 1 : #

Total comments: 10

Patch Set 2 : Address Biao's comments. #

Patch Set 3 : Rebased. #

Patch Set 4 : Ascertain thread-safety. #

Patch Set 5 : SetCustomWallpaper(): Replace UserImage parameter by gfx::ImageSkia. #

Patch Set 6 : Remove unused variable. #

Patch Set 7 : Rebased. #

Patch Set 8 : Compilation fixes. #

Total comments: 19

Patch Set 9 : Rebase. #

Patch Set 10 : Address nits. #

Patch Set 11 : Some more refactoring. #

Patch Set 12 : Make pass of deep_copy more explicit. #

Patch Set 13 : git cl format. #

Patch Set 14 : Rebase on master. #

Patch Set 15 : Compilation fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -309 lines) Patch
M chrome/browser/chromeos/extensions/wallpaper_api.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/extensions/wallpaper_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +11 lines, -14 lines 0 comments Download
M chrome/browser/chromeos/extensions/wallpaper_private_api.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -3 lines 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 10 chunks +16 lines, -19 lines 0 comments Download
M chrome/browser/chromeos/login/user.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/login/user_manager_impl.h View 1 2 3 4 5 6 7 8 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 13 15 chunks +55 lines, -84 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 14 31 chunks +149 lines, -177 lines 0 comments Download
M chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc View 1 2 3 4 5 6 7 8 4 chunks +7 lines, -5 lines 0 comments Download
M chromeos/chromeos_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 27 (0 generated)
Thiemo Nagel
Hi Biao/Nikita, over the last weeks, I've accumulated various bits of cleanup for WallpaperManager which ...
6 years, 8 months ago (2014-04-02 13:12:27 UTC) #1
bshe
https://codereview.chromium.org/221873005/diff/60001/chrome/browser/chromeos/login/user.h File chrome/browser/chromeos/login/user.h (right): https://codereview.chromium.org/221873005/diff/60001/chrome/browser/chromeos/login/user.h#newcode110 chrome/browser/chromeos/login/user.h:110: enum WallpaperType { Could you document the removed enum ...
6 years, 8 months ago (2014-04-02 15:11:09 UTC) #2
Thiemo Nagel
Hi Biao, thanks a lot for your review! I've addressed your comments as far as ...
6 years, 8 months ago (2014-04-02 15:39:56 UTC) #3
bshe
+oshima san. I am not an expert of ImageSkia and thread safety associated with it. ...
6 years, 8 months ago (2014-04-02 16:32:19 UTC) #4
Thiemo Nagel
I think I've addressed the thread-safety issue now. Thank you for catching this! Could you ...
6 years, 8 months ago (2014-04-09 16:00:24 UTC) #5
Thiemo Nagel
Hi Biao and Nikita, may I ping you again about this? I've addressed all the ...
6 years, 8 months ago (2014-04-17 14:43:38 UTC) #6
Nikita (slow)
lgtm with nits https://codereview.chromium.org/221873005/diff/240001/chrome/browser/chromeos/extensions/wallpaper_api.cc File chrome/browser/chromeos/extensions/wallpaper_api.cc (right): https://codereview.chromium.org/221873005/diff/240001/chrome/browser/chromeos/extensions/wallpaper_api.cc#newcode122 chrome/browser/chromeos/extensions/wallpaper_api.cc:122: const gfx::ImageSkia& wallpaper) { nit: some ...
6 years, 8 months ago (2014-04-18 09:28:19 UTC) #7
bshe
On 2014/04/18 09:28:19, Nikita Kostylev wrote: > lgtm with nits > > https://codereview.chromium.org/221873005/diff/240001/chrome/browser/chromeos/extensions/wallpaper_api.cc > File ...
6 years, 8 months ago (2014-04-21 21:18:42 UTC) #8
oshima
lgtm with a nit https://codereview.chromium.org/221873005/diff/240001/chrome/browser/chromeos/login/wallpaper_manager.cc File chrome/browser/chromeos/login/wallpaper_manager.cc (right): https://codereview.chromium.org/221873005/diff/240001/chrome/browser/chromeos/login/wallpaper_manager.cc#newcode732 chrome/browser/chromeos/login/wallpaper_manager.cc:732: base::Passed(&deep_copy))); I think deep_copy.Pass() is ...
6 years, 8 months ago (2014-04-22 00:13:47 UTC) #9
Thiemo Nagel
Hi Biao, Mitsuru, Nikita, thanks a lot for your comments which I've addressed with the ...
6 years, 8 months ago (2014-04-23 17:14:06 UTC) #10
oshima
https://codereview.chromium.org/221873005/diff/240001/chrome/browser/chromeos/login/wallpaper_manager.cc File chrome/browser/chromeos/login/wallpaper_manager.cc (right): https://codereview.chromium.org/221873005/diff/240001/chrome/browser/chromeos/login/wallpaper_manager.cc#newcode732 chrome/browser/chromeos/login/wallpaper_manager.cc:732: base::Passed(&deep_copy))); On 2014/04/23 17:14:06, Thiemo Nagel wrote: > On ...
6 years, 8 months ago (2014-04-23 17:34:23 UTC) #11
Thiemo Nagel
https://codereview.chromium.org/221873005/diff/240001/chrome/browser/chromeos/login/wallpaper_manager.cc File chrome/browser/chromeos/login/wallpaper_manager.cc (right): https://codereview.chromium.org/221873005/diff/240001/chrome/browser/chromeos/login/wallpaper_manager.cc#newcode732 chrome/browser/chromeos/login/wallpaper_manager.cc:732: base::Passed(&deep_copy))); > Didn't you pass &deep_copy.Pass() instead of deep_copy.Pass()? ...
6 years, 8 months ago (2014-04-23 17:44:37 UTC) #12
oshima
On 2014/04/23 17:44:37, Thiemo Nagel wrote: > https://codereview.chromium.org/221873005/diff/240001/chrome/browser/chromeos/login/wallpaper_manager.cc > File chrome/browser/chromeos/login/wallpaper_manager.cc (right): > > https://codereview.chromium.org/221873005/diff/240001/chrome/browser/chromeos/login/wallpaper_manager.cc#newcode732 ...
6 years, 8 months ago (2014-04-24 00:02:12 UTC) #13
Thiemo Nagel
> Maybe I wasn't clear. What I meant was > > base::Passed(deep_copy.Pass()) > > and ...
6 years, 8 months ago (2014-04-24 08:54:23 UTC) #14
Nikita (slow)
lgtm
6 years, 8 months ago (2014-04-24 12:37:17 UTC) #15
oshima
lgtm
6 years, 8 months ago (2014-04-24 13:56:11 UTC) #16
bshe
On 2014/04/24 13:56:11, oshima wrote: > lgtm lgtm
6 years, 8 months ago (2014-04-24 16:28:41 UTC) #17
Thiemo Nagel
On 2014/04/24 16:28:41, bshe wrote: > On 2014/04/24 13:56:11, oshima wrote: > > lgtm > ...
6 years, 8 months ago (2014-04-24 16:34:23 UTC) #18
Thiemo Nagel
The CQ bit was checked by tnagel@chromium.org
6 years, 8 months ago (2014-04-24 16:34:34 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tnagel@chromium.org/221873005/330001
6 years, 8 months ago (2014-04-24 16:36:24 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-24 16:36:31 UTC) #21
commit-bot: I haz the power
Failed to apply patch for chrome/browser/chromeos/login/wallpaper_manager.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 8 months ago (2014-04-24 16:36:31 UTC) #22
Thiemo Nagel
The CQ bit was checked by tnagel@chromium.org
6 years, 8 months ago (2014-04-24 16:53:02 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tnagel@chromium.org/221873005/350001
6 years, 8 months ago (2014-04-24 16:54:04 UTC) #24
Thiemo Nagel
The CQ bit was checked by tnagel@chromium.org
6 years, 8 months ago (2014-04-24 17:04:35 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tnagel@chromium.org/221873005/370001
6 years, 8 months ago (2014-04-24 17:08:27 UTC) #26
commit-bot: I haz the power
6 years, 8 months ago (2014-04-24 23:05:04 UTC) #27
Message was sent while issue was closed.
Change committed as 266026

Powered by Google App Engine
This is Rietveld 408576698