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

Issue 7321011: Multi-Profiles: Add delete profile command (Closed)

Created:
9 years, 5 months ago by sail
Modified:
9 years, 5 months ago
CC:
chromium-reviews, rginda+watch_chromium.org, achuith+watch_chromium.org
Visibility:
Public.

Description

Multi-Profiles: Add delete profile command This change adds a delete profile command. The command does the following: - closes all browser windows with that profile - removes the profile from our list of known profiles - schedules the profile directory to be deleted when the application quits The command will eventually be exposed through the settings UI. Until that's ready I'm adding it to the avatar menu. BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=91777

Patch Set 1 #

Patch Set 2 : remove debug code #

Total comments: 16

Patch Set 3 : address review feedback #

Patch Set 4 : address review comments #

Patch Set 5 : fix compile error #

Patch Set 6 : Multi-Profiles: Add delete profile command #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -17 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_manager.h View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_manager.cc View 1 2 3 4 5 3 chunks +32 lines, -1 line 0 comments Download
M chrome/browser/ui/browser_list.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_list.cc View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser/avatar_button.mm View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/gtk/browser_titlebar.cc View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/gtk/profile_menu_button.h View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/gtk/profile_menu_button.cc View 1 2 3 4 5 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/profile_menu_model.h View 1 2 3 4 5 3 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/ui/profile_menu_model.cc View 1 2 3 4 5 2 chunks +10 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/frame/glass_browser_frame_view.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
sail
9 years, 5 months ago (2011-07-07 17:25:17 UTC) #1
willchan no longer on Chromium
I defer to mirandac here. http://codereview.chromium.org/7321011/diff/2001/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): http://codereview.chromium.org/7321011/diff/2001/chrome/browser/profiles/profile_manager.cc#newcode46 chrome/browser/profiles/profile_manager.cc:46: void DeleteProfileDirectories(std::vector<FilePath> paths) { ...
9 years, 5 months ago (2011-07-07 17:36:27 UTC) #2
Miranda Callahan
http://codereview.chromium.org/7321011/diff/2001/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): http://codereview.chromium.org/7321011/diff/2001/chrome/browser/profiles/profile_manager.cc#newcode561 chrome/browser/profiles/profile_manager.cc:561: BrowserList::CloseAllBrowsersWithProfile(profile); Is there any issue with BackgroundApps that we ...
9 years, 5 months ago (2011-07-07 17:43:02 UTC) #3
Miranda Callahan
http://codereview.chromium.org/7321011/diff/2001/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): http://codereview.chromium.org/7321011/diff/2001/chrome/browser/profiles/profile_manager.cc#newcode115 chrome/browser/profiles/profile_manager.cc:115: if (profiles_to_delete_.size()) { On 2011/07/07 17:36:27, willchan wrote: > ...
9 years, 5 months ago (2011-07-07 17:45:54 UTC) #4
sail
http://codereview.chromium.org/7321011/diff/2001/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): http://codereview.chromium.org/7321011/diff/2001/chrome/browser/profiles/profile_manager.cc#newcode46 chrome/browser/profiles/profile_manager.cc:46: void DeleteProfileDirectories(std::vector<FilePath> paths) { On 2011/07/07 17:36:27, willchan wrote: ...
9 years, 5 months ago (2011-07-07 18:00:19 UTC) #5
Miranda Callahan
LGTM with following change to shut down background apps, if Rachel agrees that this is ...
9 years, 5 months ago (2011-07-07 18:24:16 UTC) #6
rpetterson
http://codereview.chromium.org/7321011/diff/2001/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): http://codereview.chromium.org/7321011/diff/2001/chrome/browser/profiles/profile_manager.cc#newcode561 chrome/browser/profiles/profile_manager.cc:561: BrowserList::CloseAllBrowsersWithProfile(profile); On 2011/07/07 18:00:19, sail wrote: > On 2011/07/07 ...
9 years, 5 months ago (2011-07-07 18:24:30 UTC) #7
Miranda Callahan
On 2011/07/07 18:24:16, Miranda Callahan wrote: > LGTM with following change to shut down background ...
9 years, 5 months ago (2011-07-07 18:24:47 UTC) #8
sail
Added a TODO for background apps.
9 years, 5 months ago (2011-07-07 18:29:55 UTC) #9
willchan no longer on Chromium
http://codereview.chromium.org/7321011/diff/2001/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): http://codereview.chromium.org/7321011/diff/2001/chrome/browser/profiles/profile_manager.cc#newcode46 chrome/browser/profiles/profile_manager.cc:46: void DeleteProfileDirectories(std::vector<FilePath> paths) { On 2011/07/07 18:00:19, sail wrote: ...
9 years, 5 months ago (2011-07-08 08:33:17 UTC) #10
sail
9 years, 5 months ago (2011-07-08 16:04:33 UTC) #11
http://codereview.chromium.org/7321011/diff/2001/chrome/browser/profiles/prof...
File chrome/browser/profiles/profile_manager.cc (right):

http://codereview.chromium.org/7321011/diff/2001/chrome/browser/profiles/prof...
chrome/browser/profiles/profile_manager.cc:46: void
DeleteProfileDirectories(std::vector<FilePath> paths) {
On 2011/07/08 08:33:17, willchan wrote:
> On 2011/07/07 18:00:19, sail wrote:
> > On 2011/07/07 17:36:27, willchan wrote:
> > > const std::vector<FilePath>&
> > 
> > To make it thread safe I want this to be a copy of the vector. This is
vector
> is
> > going to be really small so it shouldn't be a performance hit.
> 
> NewRunnableFunction() will take the parameters and copy them. See:
> 
>
http://codesearch.google.com/codesearch#OAMlx_jo-ck/src/base/task.h&exact_pac...
>
http://codesearch.google.com/codesearch#OAMlx_jo-ck/src/base/task.h&exact_pac...
> and in particular:
>
http://codesearch.google.com/codesearch#OAMlx_jo-ck/src/base/task.h&exact_pac...
> 
> The last link will show how for const A& a passed as a parameter to
> NewRunnableFunction(), NewRunnableFunction() will create a Tuple1<A>, NOT
> Tuple1<const A&>. This Tuple1<A> becomes the Params template parameter in the
> previous links. The Params parameter becomes a member variable of the
> RunnableFunction subclass of Task.
> 
> Contrary to popular misunderstanding, the function prototype does not affect
> whether or not NewRunnableMethod()/NewRunnableFunction() copies the parameter
> into the Task.
> 
> So making this function prototype be like this just causes
> RunnableFunction::Run() to make an extra unnecessary copy of this vector when
it
> calls the function pointer.

Thanks for the explanation! Sent out fix in a separate CL:
http://codereview.chromium.org/7328021

Powered by Google App Engine
This is Rietveld 408576698