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

Issue 292713003: Session restore shouldn't care about profile home pages. (Closed)

Created:
6 years, 7 months ago by marja
Modified:
6 years, 7 months ago
CC:
chromium-reviews, marja+watch_chromium.org
Visibility:
Public.

Description

Session restore shouldn't care about profile home pages. The logic where we treated an empty URL as home page is outdated. This CL contains the following additional fixes: 1) Disallow using empty URLs to denote anything (home page, new tab page...) and force the callers of chrome::Navigate to specify which URL they want to open. Using empty URLs was hiding bugs (see below). 2) Fixed StartupBrowserCreatorTest.UpdateWithTwoProfiles and ProfilesWithoutPagesNotLaunched so that they don't work by accident (about:blank used to be the home page - it wasn't restoring the previous session, but launching the home page). 3) There was some code passing GURL("new_tab_page") around, and comparing against that. But that's an invalid URL, so GURL will just make it empty, and the result is not what is expected. (E.g,. GURL("foo") == GURL("new_tab_page")). 4) Fixed other places which were passing GURL("something_invalid") around and pretending it's something meaningful. It was just a coincidence that nothing was broken. BUG=371852 R=sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272182

Patch Set 1 #

Patch Set 2 : fixes #

Patch Set 3 : more fixes #

Patch Set 4 : more fixes #

Patch Set 5 : more fixes #

Patch Set 6 : . #

Patch Set 7 : more fixes #

Total comments: 3

Patch Set 8 : restore magic hosts #

Patch Set 9 : . #

Patch Set 10 : extensions want ntp, not blank #

Patch Set 11 : . #

Patch Set 12 : disable 2 tests on mac (they fail after "fixed") #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -51 lines) Patch
M chrome/browser/download/download_browsertest.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_test.cc View 1 2 3 4 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/extensions/extension_api_unittest.cc View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_tab_util.cc View 1 2 9 10 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sessions/session_restore.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/signin/signin_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser_navigator.cc View 1 3 chunks +5 lines, -13 lines 0 comments Download
M chrome/browser/ui/browser_tabrestore_browsertest.cc View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 11 chunks +48 lines, -11 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator_impl.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/autofill/autofill_dialog_views_unittest.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 16 (0 generated)
marja
sky, ptal I might need to disable SigninBrowserTest.NotTrustedAfterRedirect for mac, since the trivial fix (just ...
6 years, 7 months ago (2014-05-20 16:19:12 UTC) #1
marja
On 2014/05/20 16:19:12, marja wrote: > sky, ptal > > I might need to disable ...
6 years, 7 months ago (2014-05-20 16:19:36 UTC) #2
sky
+cpu see comment below https://codereview.chromium.org/292713003/diff/120001/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc (left): https://codereview.chromium.org/292713003/diff/120001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#oldcode894 chrome/browser/ui/startup/startup_browser_creator_impl.cc:894: if (it->host() == "new_tab_page") { ...
6 years, 7 months ago (2014-05-20 17:30:54 UTC) #3
cpu_(ooo_6.6-7.5)
https://codereview.chromium.org/292713003/diff/120001/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc (left): https://codereview.chromium.org/292713003/diff/120001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#oldcode894 chrome/browser/ui/startup/startup_browser_creator_impl.cc:894: if (it->host() == "new_tab_page") { On 2014/05/20 17:30:54, sky ...
6 years, 7 months ago (2014-05-20 18:35:38 UTC) #4
sky
On 2014/05/20 18:35:38, cpu wrote: > https://codereview.chromium.org/292713003/diff/120001/chrome/browser/ui/startup/startup_browser_creator_impl.cc > File chrome/browser/ui/startup/startup_browser_creator_impl.cc (left): > > https://codereview.chromium.org/292713003/diff/120001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#oldcode894 > ...
6 years, 7 months ago (2014-05-20 19:23:47 UTC) #5
robertshield
https://codereview.chromium.org/292713003/diff/120001/chrome/browser/ui/startup/startup_browser_creator_impl.cc File chrome/browser/ui/startup/startup_browser_creator_impl.cc (left): https://codereview.chromium.org/292713003/diff/120001/chrome/browser/ui/startup/startup_browser_creator_impl.cc#oldcode894 chrome/browser/ui/startup/startup_browser_creator_impl.cc:894: if (it->host() == "new_tab_page") { On 2014/05/20 18:35:38, cpu ...
6 years, 7 months ago (2014-05-20 19:36:25 UTC) #6
sky
On Tue, May 20, 2014 at 12:36 PM, <robertshield@chromium.org> wrote: > > https://codereview.chromium.org/292713003/diff/120001/chrome/browser/ui/startup/startup_browser_creator_impl.cc > File ...
6 years, 7 months ago (2014-05-20 19:48:49 UTC) #7
marja
Thanks for noticing the bug! I didn't realize we might have correct magic URLs coming ...
6 years, 7 months ago (2014-05-21 09:23:40 UTC) #8
grt (UTC plus 2)
On 2014/05/21 09:23:40, marja wrote: > Thanks for noticing the bug! I didn't realize we ...
6 years, 7 months ago (2014-05-21 10:46:32 UTC) #9
sky
LGTM
6 years, 7 months ago (2014-05-21 16:03:10 UTC) #10
marja
Thanks for review! The latest patch set disables 2 tests on mac (the fixed versions ...
6 years, 7 months ago (2014-05-22 07:37:17 UTC) #11
marja
The CQ bit was checked by marja@chromium.org
6 years, 7 months ago (2014-05-22 07:37:24 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/marja@chromium.org/292713003/200001
6 years, 7 months ago (2014-05-22 07:38:24 UTC) #13
marja
On 2014/05/22 07:38:24, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
6 years, 7 months ago (2014-05-22 14:53:23 UTC) #14
marja
The CQ bit was unchecked by marja@chromium.org
6 years, 7 months ago (2014-05-22 14:53:27 UTC) #15
marja
6 years, 7 months ago (2014-05-22 15:04:08 UTC) #16
Message was sent while issue was closed.
Committed patchset #12 manually as r272182 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698