summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_list.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-11 17:19:03 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-11 17:19:03 +0000
commit03e220f75621e6773f0a4bb13d0c59f03035bbaa (patch)
tree0131b3dc69ebe45665c2771e4d4500233a5de2b7 /chrome/browser/browser_list.cc
parentd725d2c5bffbf92b2117696aa4812d4d36c63c40 (diff)
downloadchromium_src-03e220f75621e6773f0a4bb13d0c59f03035bbaa.zip
chromium_src-03e220f75621e6773f0a4bb13d0c59f03035bbaa.tar.gz
chromium_src-03e220f75621e6773f0a4bb13d0c59f03035bbaa.tar.bz2
Fixes bug in BrowserList::FindBrowserWithFeature.
BUG=none TEST=none Review URL: http://codereview.chromium.org/2014009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46932 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_list.cc')
-rw-r--r--chrome/browser/browser_list.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/browser_list.cc b/chrome/browser/browser_list.cc
index 1ec797c..1b41be7 100644
--- a/chrome/browser/browser_list.cc
+++ b/chrome/browser/browser_list.cc
@@ -336,8 +336,8 @@ Browser* BrowserList::GetLastActive() {
// static
Browser* BrowserList::GetLastActiveWithProfile(Profile* p) {
- // We are only interested in last active browsers, so we don't fall back to all
- // browsers like FindBrowserWith* do.
+ // We are only interested in last active browsers, so we don't fall back to
+ // all browsers like FindBrowserWith* do.
return FindBrowserMatching(
BrowserList::begin_last_active(), BrowserList::end_last_active(), p,
Browser::TYPE_ANY, Browser::FEATURE_NONE, kMatchNothing);
@@ -361,12 +361,12 @@ Browser* BrowserList::FindBrowserWithFeature(Profile* p,
Browser::WindowFeature feature) {
Browser* browser = FindBrowserMatching(
BrowserList::begin_last_active(), BrowserList::end_last_active(),
- p, Browser::TYPE_ANY, Browser::FEATURE_NONE, kMatchNothing);
+ p, Browser::TYPE_ANY, feature, kMatchCanSupportWindowFeature);
// Fall back to a forward scan of all Browsers if no active one was found.
return browser ? browser :
FindBrowserMatching(BrowserList::begin(), BrowserList::end(), p,
- Browser::TYPE_ANY, Browser::FEATURE_NONE,
- kMatchNothing);
+ Browser::TYPE_ANY, feature,
+ kMatchCanSupportWindowFeature);
}
// static