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

Issue 8822015: [cros] Profile image downloader is always reset after a download. (Closed)

Created:
9 years ago by Ivan Korotkov
Modified:
9 years ago
Reviewers:
whywhat
CC:
chromium-reviews, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

[cros] Profile image downloader is always reset after a download. Additionally, downloaded profile image is no more saved to file every time it is downloaded after login. BUG=chromium-os:23684 TEST=Manual: see bug description Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=113592

Patch Set 1 #

Patch Set 2 : Merge with svn #

Total comments: 10

Patch Set 3 : Comments added. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -25 lines) Patch
M chrome/browser/chromeos/login/user.h View 1 2 3 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/user.cc View 1 2 chunks +18 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/user_manager.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/user_manager.cc View 1 9 chunks +30 lines, -24 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Ivan Korotkov
PTAL
9 years ago (2011-12-06 16:51:24 UTC) #1
whywhat
lgtm http://codereview.chromium.org/8822015/diff/1005/chrome/browser/chromeos/login/user.cc File chrome/browser/chromeos/login/user.cc (right): http://codereview.chromium.org/8822015/diff/1005/chrome/browser/chromeos/login/user.cc#newcode43 chrome/browser/chromeos/login/user.cc:43: image_index_ = image_index; What values |image_index| can take ...
9 years ago (2011-12-06 17:51:31 UTC) #2
Ivan Korotkov
9 years ago (2011-12-08 10:52:20 UTC) #3
http://codereview.chromium.org/8822015/diff/1005/chrome/browser/chromeos/logi...
File chrome/browser/chromeos/login/user.cc (right):

http://codereview.chromium.org/8822015/diff/1005/chrome/browser/chromeos/logi...
chrome/browser/chromeos/login/user.cc:43: image_index_ = image_index;
On 2011/12/06 17:51:31, whywhat wrote:
> What values |image_index| can take here?

Commented.

http://codereview.chromium.org/8822015/diff/1005/chrome/browser/chromeos/logi...
File chrome/browser/chromeos/login/user.h (right):

http://codereview.chromium.org/8822015/diff/1005/chrome/browser/chromeos/logi...
chrome/browser/chromeos/login/user.h:57: bool image_is_stub() const { return
image_is_stub_; }
On 2011/12/06 17:51:31, whywhat wrote:
> optional: rename method to is_image_downloading()?

This isn't actually User's knowledge if image is downloading or not, just that
we've set a stub image previously.

http://codereview.chromium.org/8822015/diff/1005/chrome/browser/chromeos/logi...
chrome/browser/chromeos/login/user.h:75: void SetStubImage(int image_index);
On 2011/12/06 17:51:31, whywhat wrote:
> Document what index is.

Done.

http://codereview.chromium.org/8822015/diff/1005/chrome/browser/chromeos/logi...
chrome/browser/chromeos/login/user.h:95: // This is true after a |SetStubImage|
call and until a |SetImage| call.
On 2011/12/06 17:51:31, whywhat wrote:
> nit: sounds kind of hacky, no? Could it be "True if we're in the process of
> downloading profile picture and have set a white ghost avatar as user picture
> for the time being."

Rephrased.

http://codereview.chromium.org/8822015/diff/1005/chrome/browser/chromeos/logi...
File chrome/browser/chromeos/login/user_manager.cc (right):

http://codereview.chromium.org/8822015/diff/1005/chrome/browser/chromeos/logi...
chrome/browser/chromeos/login/user_manager.cc:730:
user->SetStubImage(image_index);
On 2011/12/06 17:51:31, whywhat wrote:
> Why not check for empty image in User::SetImage and call SetStubImage from
> there?

I'd like the User's API to be more explicit.

Powered by Google App Engine
This is Rietveld 408576698