|
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=
|
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
|
Total messages: 4 (0 generated)
|