summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
authormarja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-22 15:04:03 +0000
committermarja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-22 15:04:03 +0000
commitf5ec3c92637862f610d23e857aea85142978e902 (patch)
tree7c50647a8d48bc397acc29b992d84476a2912f07 /chrome/browser/download
parent2729c5b2e315e73e7ab4270e49534b712a60ddec (diff)
downloadchromium_src-f5ec3c92637862f610d23e857aea85142978e902.zip
chromium_src-f5ec3c92637862f610d23e857aea85142978e902.tar.gz
chromium_src-f5ec3c92637862f610d23e857aea85142978e902.tar.bz2
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 Review URL: https://codereview.chromium.org/292713003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272182 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/download_browsertest.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 380306a..c437e7d 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -1333,7 +1333,8 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, PerWindowShelf) {
// Open a second tab and wait.
EXPECT_NE(static_cast<WebContents*>(NULL),
- chrome::AddSelectedTabWithURL(browser(), GURL(),
+ chrome::AddSelectedTabWithURL(browser(),
+ GURL(content::kAboutBlankURL),
content::PAGE_TRANSITION_TYPED));
EXPECT_EQ(2, browser()->tab_strip_model()->count());
EXPECT_TRUE(browser()->window()->IsDownloadShelfVisible());