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) |