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

Issue 6914021: Modifying the BackgroundModeManager to handle multiple profiles. (Closed)

Created:
9 years, 7 months ago by rpetterson
Modified:
9 years, 7 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Modifying the BackgroundModeManager to handle multiple profiles. The background mode manager is now owned by the broser The status tray is also owned by the browser process since there is only one per browser. Previously it was owned by the profile, but now that there are multiple profiles, it makes sense to have the browser process own it. Note: This CL does not unify the status tray into one icon. TEST=unittests (added BackgroundModeManagerTest::MultiProfile) BUG=80069, 82215 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86724

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 49

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 22

Patch Set 8 : '' #

Total comments: 22

Patch Set 9 : '' #

Total comments: 6

Patch Set 10 : '' #

Total comments: 5

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Total comments: 5

Patch Set 15 : '' #

Patch Set 16 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+506 lines, -261 lines) Patch
M chrome/browser/background_application_list_model.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/background_application_list_model.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/background_mode_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +96 lines, -46 lines 0 comments Download
M chrome/browser/background_mode_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 13 chunks +249 lines, -146 lines 0 comments Download
M chrome/browser/background_mode_manager_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/background_mode_manager_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/background_mode_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +79 lines, -26 lines 0 comments Download
M chrome/browser/background_mode_manager_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/browser_process.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +27 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +0 lines, -6 lines 0 comments Download
M chrome/browser/profiles/profile.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/profiles/profile_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +3 lines, -9 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/test/testing_browser_process.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/test/testing_browser_process.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/test/testing_profile.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M chrome/test/testing_profile.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Andrew T Wilson (Slow)
Notes from my early review. I suspect ultimately we'll want to refactor BackgroundModeData into a ...
9 years, 7 months ago (2011-05-20 00:22:09 UTC) #1
Andrew T Wilson (Slow)
One more note: app_controller_mac.mm contains logic to create a list of background apps as a ...
9 years, 7 months ago (2011-05-20 00:28:04 UTC) #2
rpetterson
http://codereview.chromium.org/6914021/diff/3001/chrome/browser/background_application_list_model.cc File chrome/browser/background_application_list_model.cc (right): http://codereview.chromium.org/6914021/diff/3001/chrome/browser/background_application_list_model.cc#newcode69 chrome/browser/background_application_list_model.cc:69: Profile* profile_; On 2011/05/20 00:22:09, Andrew T Wilson wrote: ...
9 years, 7 months ago (2011-05-20 05:53:17 UTC) #3
Miranda Callahan
Mostly nits and a couple comments... thanks! http://codereview.chromium.org/6914021/diff/12032/chrome/browser/background_application_list_model.cc File chrome/browser/background_application_list_model.cc (right): http://codereview.chromium.org/6914021/diff/12032/chrome/browser/background_application_list_model.cc#newcode52 chrome/browser/background_application_list_model.cc:52: Profile* profile_); ...
9 years, 7 months ago (2011-05-20 15:16:53 UTC) #4
Miranda Callahan
http://codereview.chromium.org/6914021/diff/3001/chrome/browser/profiles/profile_status_menu_model.h File chrome/browser/profiles/profile_status_menu_model.h (right): http://codereview.chromium.org/6914021/diff/3001/chrome/browser/profiles/profile_status_menu_model.h#newcode6 chrome/browser/profiles/profile_status_menu_model.h:6: #define CHROME_BROWSER_PROFILES_PROFILE_STATUS_MENU_MODEL_H_ On 2011/05/20 05:53:17, rpetterson wrote: > On ...
9 years, 7 months ago (2011-05-20 15:20:17 UTC) #5
Miranda Callahan
On 2011/05/20 00:28:04, Andrew T Wilson wrote: > One more note: app_controller_mac.mm contains logic to ...
9 years, 7 months ago (2011-05-20 15:21:13 UTC) #6
Andrew T Wilson (Slow)
Just made a quick pass to respond to your previous comments (and Miranda's). Sounds like ...
9 years, 7 months ago (2011-05-20 16:52:45 UTC) #7
Miranda Callahan
http://codereview.chromium.org/6914021/diff/3001/chrome/browser/background_mode_manager.cc File chrome/browser/background_mode_manager.cc (right): http://codereview.chromium.org/6914021/diff/3001/chrome/browser/background_mode_manager.cc#newcode121 chrome/browser/background_mode_manager.cc:121: background_mode_data_.begin(); On 2011/05/20 16:52:45, Andrew T Wilson wrote: > ...
9 years, 7 months ago (2011-05-20 16:56:45 UTC) #8
rpetterson
One note, some of the checks for creating the status icon should clear up in ...
9 years, 7 months ago (2011-05-23 03:23:19 UTC) #9
Miranda Callahan
LGTM from my side! On 2011/05/23 03:23:19, rpetterson wrote: > One note, some of the ...
9 years, 7 months ago (2011-05-23 15:57:39 UTC) #10
Andrew T Wilson (Slow)
This is pretty close - I just have a few more questions/issues, with some style ...
9 years, 7 months ago (2011-05-23 20:35:40 UTC) #11
rpetterson
http://codereview.chromium.org/6914021/diff/19001/chrome/browser/background_application_list_model.cc File chrome/browser/background_application_list_model.cc (right): http://codereview.chromium.org/6914021/diff/19001/chrome/browser/background_application_list_model.cc#newcode52 chrome/browser/background_application_list_model.cc:52: Profile* profile); On 2011/05/23 20:35:40, Andrew T Wilson wrote: ...
9 years, 7 months ago (2011-05-24 02:18:00 UTC) #12
Andrew T Wilson (Slow)
So, I'd like to understand why we need to create BackgroundModeManager in TestingBrowserProcess now when ...
9 years, 7 months ago (2011-05-24 20:49:28 UTC) #13
rpetterson
Fixed up the items we discussed over chat as well (or rather reverted them back ...
9 years, 7 months ago (2011-05-24 21:48:42 UTC) #14
Andrew T Wilson (Slow)
LGTM, with the notes below and assuming the deletion of RegisterPrefs() was just a merge ...
9 years, 7 months ago (2011-05-25 01:17:44 UTC) #15
Andrew T Wilson (Slow)
Ooops, I see that you just moved RegisterPrefs(), you didn't delete it. So ignore that ...
9 years, 7 months ago (2011-05-25 01:18:38 UTC) #16
rpetterson
9 years, 7 months ago (2011-05-25 19:57:12 UTC) #17
http://codereview.chromium.org/6914021/diff/31015/chrome/browser/background_m...
File chrome/browser/background_mode_manager.h (right):

http://codereview.chromium.org/6914021/diff/31015/chrome/browser/background_m...
chrome/browser/background_mode_manager.h:121: typedef
linked_ptr<BackgroundModeData> BackgroundModeInfo;
On 2011/05/25 01:17:44, Andrew T Wilson wrote:
> Add a comment about why we are using linked_ptr here (because of the map issue
> you mentioned).

Done.

http://codereview.chromium.org/6914021/diff/31015/chrome/browser/background_m...
chrome/browser/background_mode_manager.h:199:
BackgroundModeManager::BackgroundModeInfo GetBackgroundModeInfo(
On 2011/05/25 01:17:44, Andrew T Wilson wrote:
> The other thing I wanted to mention is that we probably should be returning
> BackgroundModeData* from here, not a BackgroundModeInfo (dereference before
> returning). The reason is that we really don't want calling
> GetBackgroundModeInfo() to be changing the reference count, IMO -- we should
> always retain ownership in background_mode_data_ and only expose weak pointers
> outside that. Anyhow, not a big deal, so if you agree feel free to make this
> change in a separate CL (and if you disagree just ignore this :)

I understand your point now. I'll include this in the next CL to unify the
status icons.

Powered by Google App Engine
This is Rietveld 408576698