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

Issue 9020013: Refactor ProfileInfoCacheObserver interface and usage thereof. (Closed)

Created:
9 years ago by SteveT
Modified:
9 years ago
Reviewers:
sail
CC:
chromium-reviews, Paweł Hajdan Jr.
Visibility:
Public.

Description

Refactor ProfileInfoCacheObserver interface and usage thereof. We want to simplify OnProfileAdded and OnProfileAvatarChanged so decouple the Observer interface a bit away from ProfileShortcutManagerWin. Instead, classes that implement the interface should fetch the global cache object and retrieve any additional information it needs from there when they are notified. BUG=none TEST=Ensure that ProfileInfoCacheTest and BackgroundModeManagerTest unit tests all pass. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=115621

Patch Set 1 : init #

Total comments: 7

Patch Set 2 : changed remaining callbacks to use only profile_path where possible #

Total comments: 1

Patch Set 3 : nit + fixed badge update issue #

Total comments: 5

Patch Set 4 : Fixed notification in SetIsUsingGAIAPicture #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -151 lines) Patch
M chrome/browser/background/background_mode_manager.h View 1 1 chunk +7 lines, -12 lines 0 comments Download
M chrome/browser/background/background_mode_manager.cc View 1 5 chunks +21 lines, -12 lines 0 comments Download
M chrome/browser/background/background_mode_manager_unittest.cc View 1 2 1 chunk +8 lines, -13 lines 0 comments Download
M chrome/browser/profiles/profile_info_cache.cc View 1 2 3 8 chunks +15 lines, -35 lines 0 comments Download
M chrome/browser/profiles/profile_info_cache_observer.h View 1 1 chunk +7 lines, -17 lines 0 comments Download
M chrome/browser/profiles/profile_info_cache_unittest.h View 1 1 chunk +9 lines, -13 lines 0 comments Download
M chrome/browser/profiles/profile_info_cache_unittest.cc View 1 2 chunks +24 lines, -13 lines 0 comments Download
M chrome/browser/profiles/profile_shortcut_manager_win.h View 1 1 chunk +5 lines, -12 lines 0 comments Download
M chrome/browser/profiles/profile_shortcut_manager_win.cc View 1 2 9 chunks +35 lines, -24 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
SteveT
PTAL. A couple questions from me inline. http://codereview.chromium.org/9020013/diff/6002/chrome/browser/profiles/profile_info_cache_observer.h File chrome/browser/profiles/profile_info_cache_observer.h (right): http://codereview.chromium.org/9020013/diff/6002/chrome/browser/profiles/profile_info_cache_observer.h#newcode21 chrome/browser/profiles/profile_info_cache_observer.h:21: const string16& ...
9 years ago (2011-12-21 17:12:45 UTC) #1
sail
http://codereview.chromium.org/9020013/diff/6002/chrome/browser/profiles/profile_info_cache_observer.h File chrome/browser/profiles/profile_info_cache_observer.h (right): http://codereview.chromium.org/9020013/diff/6002/chrome/browser/profiles/profile_info_cache_observer.h#newcode21 chrome/browser/profiles/profile_info_cache_observer.h:21: const string16& profile_base_dir) = 0; Hi Steve, do you ...
9 years ago (2011-12-21 17:51:10 UTC) #2
sail
9 years ago (2011-12-21 17:51:11 UTC) #3
SteveT
Over to you, PTAL. http://codereview.chromium.org/9020013/diff/6002/chrome/browser/profiles/profile_info_cache_observer.h File chrome/browser/profiles/profile_info_cache_observer.h (right): http://codereview.chromium.org/9020013/diff/6002/chrome/browser/profiles/profile_info_cache_observer.h#newcode21 chrome/browser/profiles/profile_info_cache_observer.h:21: const string16& profile_base_dir) = 0; ...
9 years ago (2011-12-21 20:47:03 UTC) #4
sail
lgtm http://codereview.chromium.org/9020013/diff/7005/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): http://codereview.chromium.org/9020013/diff/7005/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode235 chrome/browser/profiles/profile_shortcut_manager_win.cc:235: UTF8ToUTF16(profile_path.BaseName().MaybeAsASCII()); since this code is windows only you ...
9 years ago (2011-12-21 21:03:12 UTC) #5
sail
http://codereview.chromium.org/9020013/diff/6002/chrome/browser/profiles/profile_info_cache_observer.h File chrome/browser/profiles/profile_info_cache_observer.h (right): http://codereview.chromium.org/9020013/diff/6002/chrome/browser/profiles/profile_info_cache_observer.h#newcode21 chrome/browser/profiles/profile_info_cache_observer.h:21: const string16& profile_base_dir) = 0; On 2011/12/21 20:47:03, SteveT ...
9 years ago (2011-12-21 21:04:12 UTC) #6
SteveT
PTAL @ manage_profile_handler.cc:205. I left a comment explaining a change I had to make to ...
9 years ago (2011-12-22 02:59:07 UTC) #7
sail
http://codereview.chromium.org/9020013/diff/6017/chrome/browser/ui/webui/options/manage_profile_handler.cc File chrome/browser/ui/webui/options/manage_profile_handler.cc (right): http://codereview.chromium.org/9020013/diff/6017/chrome/browser/ui/webui/options/manage_profile_handler.cc#newcode205 chrome/browser/ui/webui/options/manage_profile_handler.cc:205: pref_service->SetInteger(prefs::kProfileAvatarIndex, new_icon_index); On 2011/12/22 02:59:07, SteveT wrote: > I ...
9 years ago (2011-12-22 04:03:11 UTC) #8
SteveT
http://codereview.chromium.org/9020013/diff/6017/chrome/browser/ui/webui/options/manage_profile_handler.cc File chrome/browser/ui/webui/options/manage_profile_handler.cc (right): http://codereview.chromium.org/9020013/diff/6017/chrome/browser/ui/webui/options/manage_profile_handler.cc#newcode205 chrome/browser/ui/webui/options/manage_profile_handler.cc:205: pref_service->SetInteger(prefs::kProfileAvatarIndex, new_icon_index); Hm... So SetIsUsingGAIAPictureOfProfileAtIndex currently only notifies observers ...
9 years ago (2011-12-22 04:36:24 UTC) #9
sail
http://codereview.chromium.org/9020013/diff/6017/chrome/browser/ui/webui/options/manage_profile_handler.cc File chrome/browser/ui/webui/options/manage_profile_handler.cc (right): http://codereview.chromium.org/9020013/diff/6017/chrome/browser/ui/webui/options/manage_profile_handler.cc#newcode205 chrome/browser/ui/webui/options/manage_profile_handler.cc:205: pref_service->SetInteger(prefs::kProfileAvatarIndex, new_icon_index); On 2011/12/22 04:36:24, SteveT wrote: > Hm... ...
9 years ago (2011-12-22 04:48:28 UTC) #10
SteveT
I've removed the |value| check in SetIsUsingGAIAPIcture and surely enough, it fixes the badging issue ...
9 years ago (2011-12-22 15:21:39 UTC) #11
sail
lgtm
9 years ago (2011-12-22 17:36:31 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stevet@chromium.org/9020013/11001
9 years ago (2011-12-22 18:25:26 UTC) #13
commit-bot: I haz the power
Try job failure for 9020013-11001 (retry) on win_rel for step "safe_browsing_tests" (clobber build). It's a ...
9 years ago (2011-12-22 20:22:36 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stevet@chromium.org/9020013/11001
9 years ago (2011-12-22 20:28:07 UTC) #15
commit-bot: I haz the power
9 years ago (2011-12-22 22:05:18 UTC) #16
Change committed as 115621

Powered by Google App Engine
This is Rietveld 408576698