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

Unified Diff: chrome/browser/ui/browser_list.cc

Issue 7321011: Multi-Profiles: Add delete profile command (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove debug code Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser_list.cc
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc
index d7c9f6a9e69e64cf722c83c4b5df4c4bb50bba29..361b66b1fe44c4f124caf6465e22f2f962ec9d69 100644
--- a/chrome/browser/ui/browser_list.cc
+++ b/chrome/browser/ui/browser_list.cc
@@ -421,6 +421,20 @@ void BrowserList::CloseAllBrowsers() {
}
}
+void BrowserList::CloseAllBrowsersWithProfile(Profile* profile) {
+ BrowserVector browsers_to_close;
+ for (BrowserList::const_iterator i = BrowserList::begin();
+ i != BrowserList::end(); ++i) {
+ if ((*i)->profile() == profile)
+ browsers_to_close.push_back(*i);
+ }
+
+ for (BrowserVector::const_iterator i = browsers_to_close.begin();
+ i != browsers_to_close.end(); ++i) {
+ (*i)->window()->Close();
+ }
+}
+
// static
void BrowserList::AttemptUserExit() {
#if defined(OS_CHROMEOS)

Powered by Google App Engine
This is Rietveld 408576698