DescriptionSession 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") #Messages
Total messages: 16 (0 generated)
|