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

Issue 1794323003: Make user_manager::UserImage non-copyable (Closed)

Created:
4 years, 9 months ago by satorux1
Modified:
4 years, 8 months ago
Reviewers:
achuithb, xdai1, hashimoto
CC:
chromium-reviews, dzhioev+watch_chromium.org, achuith+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make user_manager::UserImage non-copyable The class contains |image_bytes_| member for JPEG data bytes that can be very large for wallpapers, thus is expensive to copy. This patch makes the class non-copyable and eliminates some instances of object copies. BUG=593251 TEST=user image and wallpaper stuff works as before Committed: https://crrev.com/40e5476f77c26efab0a63f05e8498ec8968565de Cr-Commit-Position: refs/heads/master@{#384848}

Patch Set 1 : #

Total comments: 20

Patch Set 2 : just rebase #

Patch Set 3 : address comments #

Patch Set 4 : address comments #

Total comments: 3

Patch Set 5 : just rebase #

Patch Set 6 : just rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -138 lines) Patch
M chrome/browser/chromeos/login/users/avatar/mock_user_image_manager.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/chromeos/login/users/avatar/user_image_loader.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/login/users/avatar/user_image_loader.cc View 2 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/login/users/avatar/user_image_manager.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc View 1 2 3 11 chunks +86 lines, -59 lines 0 comments Download
M chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc View 1 2 3 4 5 3 chunks +9 lines, -12 lines 0 comments Download
M chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h View 3 chunks +10 lines, -8 lines 0 comments Download
M chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc View 1 2 5 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/image_source.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M components/user_manager/user.h View 4 chunks +8 lines, -8 lines 0 comments Download
M components/user_manager/user.cc View 3 chunks +9 lines, -8 lines 0 comments Download
M components/user_manager/user_image/user_image.h View 1 2 3 chunks +5 lines, -2 lines 0 comments Download
M components/user_manager/user_image/user_image.cc View 1 2 1 chunk +6 lines, -5 lines 0 comments Download
M components/wallpaper/wallpaper_manager_base.h View 3 chunks +3 lines, -3 lines 0 comments Download
M components/wallpaper/wallpaper_manager_base.cc View 1 2 2 chunks +8 lines, -5 lines 0 comments Download

Messages

Total messages: 23 (7 generated)
satorux1
4 years, 9 months ago (2016-03-15 07:57:08 UTC) #4
hashimoto
It's not necessary to eliminate all data copy in this change, so please feel free ...
4 years, 9 months ago (2016-03-15 08:39:28 UTC) #5
satorux1
https://codereview.chromium.org/1794323003/diff/40001/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc File chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc (right): https://codereview.chromium.org/1794323003/diff/40001/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc#newcode344 chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc:344: // JPEG data of 512x512 pixels (usually <100KB), thus ...
4 years, 9 months ago (2016-03-16 02:01:30 UTC) #6
hashimoto
https://codereview.chromium.org/1794323003/diff/40001/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc File chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc (right): https://codereview.chromium.org/1794323003/diff/40001/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc#newcode400 chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc:400: // See the comment in SetToImageData() for why the ...
4 years, 9 months ago (2016-03-17 06:06:51 UTC) #7
satorux1
https://codereview.chromium.org/1794323003/diff/40001/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc File chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc (right): https://codereview.chromium.org/1794323003/diff/40001/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc#newcode400 chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc:400: // See the comment in SetToImageData() for why the ...
4 years, 9 months ago (2016-03-17 06:56:22 UTC) #8
hashimoto
lgtm
4 years, 9 months ago (2016-03-17 06:58:41 UTC) #9
satorux1
https://codereview.chromium.org/1794323003/diff/100001/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc File chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc (right): https://codereview.chromium.org/1794323003/diff/100001/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc#newcode235 chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc:235: // |image_is_safe_format|. Local state will be updated as needed. ...
4 years, 9 months ago (2016-03-17 06:59:39 UTC) #10
satorux1
+achuith: components/user_manager/... +xdai: components/wallpaper/...
4 years, 9 months ago (2016-03-17 07:13:18 UTC) #12
satorux1
ping achuith and xdai
4 years, 9 months ago (2016-03-18 08:39:04 UTC) #13
achuithb
lgtm assuming you change the method name below. https://codereview.chromium.org/1794323003/diff/100001/components/user_manager/user.h File components/user_manager/user.h (right): https://codereview.chromium.org/1794323003/diff/100001/components/user_manager/user.h#newcode227 components/user_manager/user.h:227: const ...
4 years, 9 months ago (2016-03-18 18:57:47 UTC) #14
xdai1
components/wallpaper lgtm
4 years, 9 months ago (2016-03-18 19:41:08 UTC) #15
satorux1
https://codereview.chromium.org/1794323003/diff/100001/components/user_manager/user.h File components/user_manager/user.h (right): https://codereview.chromium.org/1794323003/diff/100001/components/user_manager/user.h#newcode227 components/user_manager/user.h:227: const UserImage& user_image() const { return *user_image_; } On ...
4 years, 9 months ago (2016-03-18 22:46:36 UTC) #16
achuithb
On 2016/03/18 22:46:36, satorux1 wrote: > https://codereview.chromium.org/1794323003/diff/100001/components/user_manager/user.h > File components/user_manager/user.h (right): > > https://codereview.chromium.org/1794323003/diff/100001/components/user_manager/user.h#newcode227 > ...
4 years, 9 months ago (2016-03-21 19:47:27 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1794323003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1794323003/140001
4 years, 8 months ago (2016-04-04 05:07:51 UTC) #20
commit-bot: I haz the power
Committed patchset #6 (id:140001)
4 years, 8 months ago (2016-04-04 05:38:29 UTC) #21
commit-bot: I haz the power
4 years, 8 months ago (2016-04-04 05:39:31 UTC) #23
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/40e5476f77c26efab0a63f05e8498ec8968565de
Cr-Commit-Position: refs/heads/master@{#384848}

Powered by Google App Engine
This is Rietveld 408576698