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

Unified Diff: chrome/browser/browser_list.cc

Issue 92043: Refactor ExtensionView to support a UI-less extension instance.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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
« no previous file with comments | « chrome/browser/browser_list.h ('k') | chrome/browser/extensions/extension.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_list.cc
===================================================================
--- chrome/browser/browser_list.cc (revision 14851)
+++ chrome/browser/browser_list.cc (working copy)
@@ -223,6 +223,23 @@
}
// static
+Browser* BrowserList::FindBrowserWithProfile(Profile* p) {
+ Browser* last_active = GetLastActive();
+ if (last_active && last_active->profile() == p)
+ return last_active;
+
+ BrowserList::const_iterator i;
+ for (i = BrowserList::begin(); i != BrowserList::end(); ++i) {
+ if (*i == last_active)
+ continue;
+
+ if ((*i)->profile() == p)
+ return *i;
+ }
+ return NULL;
+}
+
+// static
Browser* BrowserList::FindBrowserWithID(SessionID::id_type desired_id) {
BrowserList::const_iterator i;
for (i = BrowserList::begin(); i != BrowserList::end(); ++i) {
« no previous file with comments | « chrome/browser/browser_list.h ('k') | chrome/browser/extensions/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698