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

Issue 330013: Rework the way the FindBrowserWithProfile/Type methods work.... (Closed)

Created:
11 years, 2 months ago by Ben Goodger (Google)
Modified:
9 years, 6 months ago
Reviewers:
sky
CC:
chromium-reviews_googlegroups.com, ben+cc_chromium.org
Visibility:
Public.

Description

Rework the way the FindBrowserWithProfile/Type methods work. We now always walk the last active list backwards rather than consulting the last active then walking the registered browser list forwards. I now also maintain a fallback to walk the entire registered list of browsers forward if the active scan fails. This is likely only in a testing environment where a Browser may never have been activated. This ensures that when the last active browser is a popup or app frame the last active TYPE_NORMAL browser is located when opening a new tab. http://crbug.com/17498 TEST=Open an app frame. Open a browser window (Ctrl+N) and load a page. Minimize it. Open another browser window and minimize it. Activate the app frame. Press Ctrl+T. The second browser window should be restored and have a new tab added to it rather than the first. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30531 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30659 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30662

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -49 lines) Patch
M chrome/browser/browser.h View 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/browser.cc View 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/browser_list.h View 1 2 3 4 1 chunk +6 lines, -6 lines 0 comments Download
M chrome/browser/browser_list.cc View 1 2 3 4 5 chunks +52 lines, -38 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Ben Goodger (Google)
11 years, 1 month ago (2009-10-26 21:41:23 UTC) #1
sky
LGTM. http://codereview.chromium.org/330013/diff/2001/3002 File chrome/browser/browser_list.cc (right): http://codereview.chromium.org/330013/diff/2001/3002#newcode88 Line 88: if (type == Browser::TYPE_ANY || browser->type() == ...
11 years, 1 month ago (2009-10-26 22:02:56 UTC) #2
Ben Goodger (Google)
Is there a reason we couldn't hoist the enumeration out into a browser_constants.h file or ...
11 years, 1 month ago (2009-10-27 16:34:48 UTC) #3
sky
I had to revert my change. Good question. Let me figure out why my change ...
11 years, 1 month ago (2009-10-27 16:57:43 UTC) #4
Ben Goodger (Google)
Hey Scott, I made some changes here to get this to pass the browser_tests. It ...
11 years, 1 month ago (2009-10-31 05:15:35 UTC) #5
sky
11 years, 1 month ago (2009-11-02 15:49:03 UTC) #6
OK

Seems like it would be worth adding a comment as to why you fallback to a
forward search.

Powered by Google App Engine
This is Rietveld 408576698