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

Issue 1198313003: Fix the browser match rules. (Closed)

Created:
5 years, 6 months ago by xdai1
Modified:
5 years, 5 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

When we try to find a browser window based on some matching rules, we need to return a browser window that are shown on the given |profile|'s desktop to prevent returning a browser window on other users' desktop. Also clean up and refactor codes related to TestBrowserWindowAura class. There were multiple files defining TestBrowserWindowAura that were almost identical. Extracted this class to test_browser_window.h .cc files and added helper function CreateBrowserWithAuraTestWindowForParams() to handle its lifetime. BUG=500027 Committed: https://crrev.com/69630960fee17f0fa81b47b81625da31055daa7a Cr-Commit-Position: refs/heads/master@{#339809}

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Total comments: 26

Patch Set 3 : Address msw@'s comments. #

Total comments: 10

Patch Set 4 : Address msw@'s comments. #

Patch Set 5 : Wrap TestBrowserWindowAura inside of (USE_AURA) to fix test failure. #

Patch Set 6 : #

Total comments: 28

Patch Set 7 : Address msw@'s comments. #

Total comments: 8

Patch Set 8 : Address msw@'s comments. #

Total comments: 1

Patch Set 9 : Revert back to use Browesr raw pointer as the return type for CreateBrowserWithTestWindowForParams #

Total comments: 3

Patch Set 10 : Use scoped_ptr<Browser> instead. #

Total comments: 16

Patch Set 11 : Address msw@'s comments. #

Total comments: 2

Patch Set 12 : Move TestBrowserWindowAura into its own .h .cc files #

Total comments: 2

Patch Set 13 : Address sky@'s comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+490 lines, -415 lines) Patch
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +17 lines, -60 lines 0 comments Download
M chrome/browser/ui/ash/window_positioner_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +20 lines, -68 lines 0 comments Download
M chrome/browser/ui/browser_finder.cc View 1 2 chunks +18 lines, -9 lines 0 comments Download
A chrome/browser/ui/browser_finder_chromeos_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +136 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller_unittest.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +147 lines, -244 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/test/base/test_browser_window.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +17 lines, -1 line 0 comments Download
M chrome/test/base/test_browser_window.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +20 lines, -29 lines 0 comments Download
A chrome/test/base/test_browser_window_aura.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +43 lines, -0 lines 0 comments Download
A chrome/test/base/test_browser_window_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +55 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (13 generated)
xdai1
msw@, could you help to review the CL please? Thanks!
5 years, 6 months ago (2015-06-23 00:50:45 UTC) #2
msw
Do we have any browser finder tests? A test for this would be good. Please ...
5 years, 6 months ago (2015-06-23 17:08:51 UTC) #3
xdai1
Thanks for the review! Please take anther look. +sky to decide if it's a proper ...
5 years, 5 months ago (2015-06-30 16:16:49 UTC) #7
msw
The test file seems far more complex than necessary; can you try to simplify it ...
5 years, 5 months ago (2015-06-30 18:42:34 UTC) #8
xdai1
msw@, thanks for the review, please take another look! https://codereview.chromium.org/1198313003/diff/60001/chrome/browser/ui/browser_finder_chromeos_unittest.cc File chrome/browser/ui/browser_finder_chromeos_unittest.cc (right): https://codereview.chromium.org/1198313003/diff/60001/chrome/browser/ui/browser_finder_chromeos_unittest.cc#newcode7 chrome/browser/ui/browser_finder_chromeos_unittest.cc:7: ...
5 years, 5 months ago (2015-07-01 01:06:21 UTC) #10
msw
https://codereview.chromium.org/1198313003/diff/100001/chrome/browser/ui/browser_finder_chromeos_unittest.cc File chrome/browser/ui/browser_finder_chromeos_unittest.cc (right): https://codereview.chromium.org/1198313003/diff/100001/chrome/browser/ui/browser_finder_chromeos_unittest.cc#newcode23 chrome/browser/ui/browser_finder_chromeos_unittest.cc:23: class TestBrowserWindowAura : public TestBrowserWindow { I now see ...
5 years, 5 months ago (2015-07-01 19:55:16 UTC) #11
xdai1
msw@, I've addressed your comments. Please take another look, thanks! https://codereview.chromium.org/1198313003/diff/100001/chrome/browser/ui/browser_finder_chromeos_unittest.cc File chrome/browser/ui/browser_finder_chromeos_unittest.cc (right): https://codereview.chromium.org/1198313003/diff/100001/chrome/browser/ui/browser_finder_chromeos_unittest.cc#newcode23 ...
5 years, 5 months ago (2015-07-07 00:33:42 UTC) #16
msw
This is great cleanup; thank you! Mostly minor comments. https://codereview.chromium.org/1198313003/diff/240001/chrome/browser/ui/ash/window_positioner_unittest.cc File chrome/browser/ui/ash/window_positioner_unittest.cc (right): https://codereview.chromium.org/1198313003/diff/240001/chrome/browser/ui/ash/window_positioner_unittest.cc#newcode47 chrome/browser/ui/ash/window_positioner_unittest.cc:47: ...
5 years, 5 months ago (2015-07-07 18:11:55 UTC) #17
xdai1
msw@, I've addressed the comments, please take another look, thanks for the review! https://codereview.chromium.org/1198313003/diff/240001/chrome/browser/ui/ash/window_positioner_unittest.cc File ...
5 years, 5 months ago (2015-07-08 00:26:22 UTC) #19
msw
Jeez, it's too bad this code was such a mess... Thanks for working to make ...
5 years, 5 months ago (2015-07-08 01:14:00 UTC) #20
xdai1
msw@, I've addressed your comments, please take another look, thanks for your review! In this ...
5 years, 5 months ago (2015-07-08 21:34:22 UTC) #21
xdai1
Sorry I think I misunderstood your previous comment below. Revert the return type of CreateBrowserWithTestWindowForParams ...
5 years, 5 months ago (2015-07-08 22:52:47 UTC) #22
msw
On 2015/07/08 22:52:47, xdai1 wrote: > Sorry I think I misunderstood your previous comment below. ...
5 years, 5 months ago (2015-07-08 23:58:00 UTC) #23
xdai1
msw@, I've addressed your comments, please take another look, thanks! On 2015/07/08 23:58:00, msw wrote: ...
5 years, 5 months ago (2015-07-09 21:56:08 UTC) #24
msw
lgtm with mostly minor nits remaining. https://codereview.chromium.org/1198313003/diff/330001/chrome/browser/power/process_power_collector_unittest.cc File chrome/browser/power/process_power_collector_unittest.cc (right): https://codereview.chromium.org/1198313003/diff/330001/chrome/browser/power/process_power_collector_unittest.cc#newcode126 chrome/browser/power/process_power_collector_unittest.cc:126: scoped_ptr<Browser> browser2 = ...
5 years, 5 months ago (2015-07-09 22:37:37 UTC) #25
msw
Please update the CL description too.
5 years, 5 months ago (2015-07-09 22:37:57 UTC) #26
xdai1
msw@, I've addressed your comments. Thanks for your review! I'll wait sky@'s response to decide ...
5 years, 5 months ago (2015-07-09 23:45:40 UTC) #27
xdai1
sky@, could you help to review chrome/browser/ui/browser_finder.cc file to decide if the browser matching rules ...
5 years, 5 months ago (2015-07-20 16:34:35 UTC) #28
sky
I don't understand the subtlety with GetUserPresentingWindow to adequately review this. Can you get whoever ...
5 years, 5 months ago (2015-07-20 18:27:38 UTC) #29
xdai1
On 2015/07/20 18:27:38, sky wrote: > I don't understand the subtlety with GetUserPresentingWindow to adequately ...
5 years, 5 months ago (2015-07-20 18:36:16 UTC) #31
Mr4D (OOO till 08-26)
lgtm
5 years, 5 months ago (2015-07-20 19:53:04 UTC) #32
xdai1
On 2015/07/20 19:53:04, Mr4D wrote: > lgtm skuhne@, thanks for the review! sky@, could you ...
5 years, 5 months ago (2015-07-20 20:38:13 UTC) #33
sky
https://codereview.chromium.org/1198313003/diff/350001/chrome/test/base/test_browser_window.h File chrome/test/base/test_browser_window.h (right): https://codereview.chromium.org/1198313003/diff/350001/chrome/test/base/test_browser_window.h#newcode201 chrome/test/base/test_browser_window.h:201: class TestBrowserWindowAura : public TestBrowserWindow { Can this be ...
5 years, 5 months ago (2015-07-20 23:09:08 UTC) #34
msw
https://codereview.chromium.org/1198313003/diff/350001/chrome/test/base/test_browser_window.h File chrome/test/base/test_browser_window.h (right): https://codereview.chromium.org/1198313003/diff/350001/chrome/test/base/test_browser_window.h#newcode201 chrome/test/base/test_browser_window.h:201: class TestBrowserWindowAura : public TestBrowserWindow { On 2015/07/20 23:09:08, ...
5 years, 5 months ago (2015-07-20 23:47:09 UTC) #35
sky
I hadn't realized it was used by more than one test, so, that sounds reasonable. ...
5 years, 5 months ago (2015-07-20 23:51:42 UTC) #36
xdai1
On 2015/07/20 23:51:42, sky wrote: > I hadn't realized it was used by more than ...
5 years, 5 months ago (2015-07-20 23:56:25 UTC) #37
sky
I prefer moving both into their own .h/.cc, eg CreateBrowserWithAuraTestWindowForParams goes in test_browser_window_aura.h and TestBrowserWindowAura ...
5 years, 5 months ago (2015-07-21 14:36:35 UTC) #38
xdai1
I've addressed the comment. Please take another look, thanks for your review. On 2015/07/21 14:36:35, ...
5 years, 5 months ago (2015-07-21 23:32:51 UTC) #39
sky
LGTM https://codereview.chromium.org/1198313003/diff/370001/chrome/test/base/test_browser_window_aura.cc File chrome/test/base/test_browser_window_aura.cc (right): https://codereview.chromium.org/1198313003/diff/370001/chrome/test/base/test_browser_window_aura.cc#newcode1 chrome/test/base/test_browser_window_aura.cc:1: // Copyright (c) 2015 The Chromium Authors. All ...
5 years, 5 months ago (2015-07-21 23:40:01 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1198313003/390001
5 years, 5 months ago (2015-07-22 00:24:45 UTC) #43
commit-bot: I haz the power
Committed patchset #13 (id:390001)
5 years, 5 months ago (2015-07-22 01:15:19 UTC) #44
commit-bot: I haz the power
5 years, 5 months ago (2015-07-22 01:16:27 UTC) #45
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/69630960fee17f0fa81b47b81625da31055daa7a
Cr-Commit-Position: refs/heads/master@{#339809}

Powered by Google App Engine
This is Rietveld 408576698