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

Issue 8539043: Refactor ProfileInfoCache (Closed)

Created:
9 years, 1 month ago by sail
Modified:
9 years, 1 month ago
CC:
chromium-reviews, kkania, achuith+watch_chromium.org, rginda+watch_chromium.org, robertshield, yoshiki+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Refactor ProfileInfoCache There are a couple of problems with ProfileInfoCache that I'd like to fix in this CL: - currently profile information is accessed by index which is very fragile - the sorted list of profiles can be difficult to maintain - there's lots of repetitive code when adding new fields to the cache - information is looked up from preferences each time. this mean there's no easy to way to keep a copy of the value for quick retrieval These capabilities are going to be important in my next CL where I'm adding 4 new fields to the cache. At a high level this CL fixes the above problems by doing the following: - move the profile information into a separate Entry class - don't maintain a sorted list of profiles. Instead, just build the sorted list on demand. BUG=91241 TEST=

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+560 lines, -567 lines) Patch
M chrome/browser/automation/testing_automation_provider.cc View 1 chunk +6 lines, -7 lines 0 comments Download
M chrome/browser/background/background_mode_manager.cc View 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/profiles/avatar_menu_model.h View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/profiles/avatar_menu_model.cc View 4 chunks +17 lines, -27 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 chunk +6 lines, -5 lines 0 comments Download
M chrome/browser/profiles/profile_info_cache.h View 3 chunks +13 lines, -71 lines 0 comments Download
M chrome/browser/profiles/profile_info_cache.cc View 5 chunks +38 lines, -358 lines 0 comments Download
A chrome/browser/profiles/profile_info_entry.h View 1 chunk +62 lines, -0 lines 0 comments Download
A chrome/browser/profiles/profile_info_entry.cc View 1 chunk +83 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_info_interface.h View 2 chunks +6 lines, -20 lines 0 comments Download
A chrome/browser/profiles/profile_info_util.h View 1 chunk +44 lines, -0 lines 0 comments Download
A chrome/browser/profiles/profile_info_util.cc View 1 chunk +195 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_manager.cc View 3 chunks +22 lines, -15 lines 0 comments Download
M chrome/browser/task_manager/task_manager_resource_providers.cc View 2 chunks +8 lines, -10 lines 0 comments Download
M chrome/browser/ui/cocoa/browser/avatar_button_controller.mm View 1 chunk +7 lines, -9 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/options/manage_profile_handler.cc View 5 chunks +18 lines, -19 lines 0 comments Download
M chrome/browser/ui/webui/options/personal_options_handler.cc View 2 chunks +12 lines, -11 lines 0 comments Download
M chrome/browser/ui/webui/sync_setup_handler.cc View 1 chunk +8 lines, -7 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
sail
This is not quite ready for review but I'm sending this out early to get ...
9 years, 1 month ago (2011-11-16 09:30:38 UTC) #1
Miranda Callahan
On 2011/11/16 09:30:38, sail wrote: > This is not quite ready for review but I'm ...
9 years, 1 month ago (2011-11-16 14:43:20 UTC) #2
sail
> Would you mind holding off until the shortcuts have landed? Sigh. Ahh, I'm also ...
9 years, 1 month ago (2011-11-16 15:23:24 UTC) #3
Miranda Callahan
9 years, 1 month ago (2011-11-16 15:43:21 UTC) #4
On 2011/11/16 15:23:24, sail wrote:
> > Would you mind holding off until the shortcuts have landed? Sigh.
> 
> Ahh, I'm also adding a bunch of stuff to this class too:
>
http://codereview.chromium.org/8511064/diff/31/chrome/browser/profiles/profil...
> 
> Waiting till next week sounds like a plan. It'll probably help me as well.
> 
> Thanks!

Ha, it looks like this week is ProfileInfoCache Celebration Week! ;-)  

Ok, that's great -- I really appreciate it! I'm in the "add tests" phase of my
CL right now -- you should see the review coming soon...

Powered by Google App Engine
This is Rietveld 408576698