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

Issue 7138002: Add profiles to wrench menu (Closed)

Created:
9 years, 6 months ago by sail
Modified:
9 years, 6 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, jam, rginda+watch_chromium.org, achuith+watch_chromium.org
Visibility:
Public.

Description

Add profiles to wrench menu This change adds a profile menu to the wrench menu. If the user has one profile then the wrench menu looks like this: Wrench Menu > ... Downloads ------- New Browsing Profile... ------- ... If the user has two or more profile then the wrench menu looks like this: Wrench Menu > ... Downloads ------- Browsing Profiles > Profile 1 Profile 2 -------- New Browsing Profile... ------- ... BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=88942

Patch Set 1 #

Patch Set 2 : Opening windows #

Total comments: 33

Patch Set 3 : Removed dynamic menu for now #

Patch Set 4 : Fixed menu item #

Total comments: 2

Patch Set 5 : Addressed review comments #

Total comments: 6

Patch Set 6 : Add profiles to wrench menu #

Total comments: 5

Patch Set 7 : '' #

Patch Set 8 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+283 lines, -9 lines) Patch
M chrome/app/chrome_command_ids.h View 1 2 3 4 5 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 2 3 4 5 1 chunk +22 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_manager.h View 1 2 3 4 5 6 7 3 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_manager.cc View 1 2 3 4 5 6 4 chunks +67 lines, -0 lines 0 comments Download
M chrome/browser/ui/profile_menu_model.cc View 1 2 3 4 5 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/toolbar/wrench_menu_model.h View 1 2 3 4 5 3 chunks +34 lines, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/wrench_menu_model.cc View 1 2 3 4 5 6 chunks +131 lines, -5 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
sail
9 years, 6 months ago (2011-06-10 05:46:38 UTC) #1
sail
http://codereview.chromium.org/7138002/diff/3001/ui/base/models/simple_menu_model.cc File ui/base/models/simple_menu_model.cc (right): http://codereview.chromium.org/7138002/diff/3001/ui/base/models/simple_menu_model.cc#newcode183 ui/base/models/simple_menu_model.cc:183: void SimpleMenuModel::RemoveItemAt(int index) { This change isn't ready yet ...
9 years, 6 months ago (2011-06-10 06:57:31 UTC) #2
Nico
http://codereview.chromium.org/7138002/diff/3001/ui/base/models/simple_menu_model.cc File ui/base/models/simple_menu_model.cc (right): http://codereview.chromium.org/7138002/diff/3001/ui/base/models/simple_menu_model.cc#newcode183 ui/base/models/simple_menu_model.cc:183: void SimpleMenuModel::RemoveItemAt(int index) { On 2011/06/10 06:57:31, sail wrote: ...
9 years, 6 months ago (2011-06-10 14:34:23 UTC) #3
Miranda Callahan
On 2011/06/10 14:34:23, Nico wrote: > http://codereview.chromium.org/7138002/diff/3001/ui/base/models/simple_menu_model.cc > File ui/base/models/simple_menu_model.cc (right): > > http://codereview.chromium.org/7138002/diff/3001/ui/base/models/simple_menu_model.cc#newcode183 > ...
9 years, 6 months ago (2011-06-10 14:38:13 UTC) #4
sail
http://codereview.chromium.org/7138002/diff/3001/ui/base/models/simple_menu_model.cc File ui/base/models/simple_menu_model.cc (right): http://codereview.chromium.org/7138002/diff/3001/ui/base/models/simple_menu_model.cc#newcode183 ui/base/models/simple_menu_model.cc:183: void SimpleMenuModel::RemoveItemAt(int index) { On 2011/06/10 14:34:23, Nico wrote: ...
9 years, 6 months ago (2011-06-10 14:52:59 UTC) #5
sky
http://codereview.chromium.org/7138002/diff/3001/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): http://codereview.chromium.org/7138002/diff/3001/chrome/browser/profiles/profile_manager.cc#newcode445 chrome/browser/profiles/profile_manager.cc:445: if (path_map) nit: return path_map ? path_map->size() : 0; ...
9 years, 6 months ago (2011-06-10 16:24:14 UTC) #6
Robert Sesek
http://codereview.chromium.org/7138002/diff/3001/ui/base/models/simple_menu_model.cc File ui/base/models/simple_menu_model.cc (right): http://codereview.chromium.org/7138002/diff/3001/ui/base/models/simple_menu_model.cc#newcode183 ui/base/models/simple_menu_model.cc:183: void SimpleMenuModel::RemoveItemAt(int index) { On 2011/06/10 14:52:59, sail wrote: ...
9 years, 6 months ago (2011-06-10 16:46:26 UTC) #7
Nico
> The other option, which I think would be all-around preferable, would be > to ...
9 years, 6 months ago (2011-06-10 17:06:33 UTC) #8
sky
On Fri, Jun 10, 2011 at 10:06 AM, Nico Weber <thakis@chromium.org> wrote: >> The other ...
9 years, 6 months ago (2011-06-10 17:10:49 UTC) #9
Peter Kasting
sky's a sufficiently good reviewer of this stuff that I'm going to take myself off ...
9 years, 6 months ago (2011-06-10 18:55:10 UTC) #10
sail
I removed the dynamic menu code for now. That's sufficiently complicated to deserve its own ...
9 years, 6 months ago (2011-06-11 01:27:37 UTC) #11
sail
9 years, 6 months ago (2011-06-11 01:31:27 UTC) #12
Miranda Callahan
A few comments; also, right now the submenu activation doesn't work in Windows. I also ...
9 years, 6 months ago (2011-06-11 15:09:08 UTC) #13
Miranda Callahan
http://codereview.chromium.org/7138002/diff/3001/chrome/browser/ui/toolbar/wrench_menu_model.cc File chrome/browser/ui/toolbar/wrench_menu_model.cc (right): http://codereview.chromium.org/7138002/diff/3001/chrome/browser/ui/toolbar/wrench_menu_model.cc#newcode280 chrome/browser/ui/toolbar/wrench_menu_model.cc:280: Browser* browser = BrowserList::FindAnyBrowser(profile, false); On 2011/06/11 15:09:08, Miranda ...
9 years, 6 months ago (2011-06-11 15:13:36 UTC) #14
sail
Thanks for the review! I think this version should work on Windows. Checking right now. ...
9 years, 6 months ago (2011-06-13 19:00:01 UTC) #15
Miranda Callahan
Looks good -- a couple more questions. http://codereview.chromium.org/7138002/diff/7010/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): http://codereview.chromium.org/7138002/diff/7010/chrome/browser/profiles/profile_manager.cc#newcode256 chrome/browser/profiles/profile_manager.cc:256: delete observer; ...
9 years, 6 months ago (2011-06-13 22:08:11 UTC) #16
sail
Fixed windows build, addressed review comments. http://codereview.chromium.org/7138002/diff/7010/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): http://codereview.chromium.org/7138002/diff/7010/chrome/browser/profiles/profile_manager.cc#newcode469 chrome/browser/profiles/profile_manager.cc:469: ProfileManager::GetSortedProfilesFromDirectoryMap() { On ...
9 years, 6 months ago (2011-06-13 23:08:45 UTC) #17
sky
LGTM http://codereview.chromium.org/7138002/diff/14001/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): http://codereview.chromium.org/7138002/diff/14001/chrome/browser/profiles/profile_manager.cc#newcode450 chrome/browser/profiles/profile_manager.cc:450: size_t index, const FilePath& user_data_dir) { each param ...
9 years, 6 months ago (2011-06-13 23:15:15 UTC) #18
sail
http://codereview.chromium.org/7138002/diff/14001/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): http://codereview.chromium.org/7138002/diff/14001/chrome/browser/profiles/profile_manager.cc#newcode450 chrome/browser/profiles/profile_manager.cc:450: size_t index, const FilePath& user_data_dir) { On 2011/06/13 23:15:15, ...
9 years, 6 months ago (2011-06-13 23:26:12 UTC) #19
sky
http://codereview.chromium.org/7138002/diff/14001/chrome/browser/profiles/profile_manager.h File chrome/browser/profiles/profile_manager.h (right): http://codereview.chromium.org/7138002/diff/14001/chrome/browser/profiles/profile_manager.h#newcode67 chrome/browser/profiles/profile_manager.h:67: string16 GetNameOfProfileAtIndex(size_t index); 2011/06/13 23:26:12, sail wrote: > On ...
9 years, 6 months ago (2011-06-13 23:59:39 UTC) #20
Miranda Callahan
9 years, 6 months ago (2011-06-14 12:25:00 UTC) #21
LGTM, thanks!

On 2011/06/13 23:59:39, sky wrote:
>
http://codereview.chromium.org/7138002/diff/14001/chrome/browser/profiles/pro...
> File chrome/browser/profiles/profile_manager.h (right):
> 
>
http://codereview.chromium.org/7138002/diff/14001/chrome/browser/profiles/pro...
> chrome/browser/profiles/profile_manager.h:67: string16
> GetNameOfProfileAtIndex(size_t index);
>  2011/06/13 23:26:12, sail wrote:
> > On 2011/06/13 23:15:15, sky wrote:
> > > const string16&
> > 
> > Hm.. in this case the name of the profile is stored in a temp variable. Is
> > returning a reference to the temp variable ok?
> 
> Yes, you're right. Definitely don't use const string16& then!

Powered by Google App Engine
This is Rietveld 408576698