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

Unified Diff: chrome/browser/extensions/extension_tab_util.cc

Issue 292713003: Session restore shouldn't care about profile home pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable 2 tests on mac (they fail after "fixed") Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_api_unittest.cc ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_tab_util.cc
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index 1cde659fe0bc85284324e274d550c3b21c05b82a..0c6d040d3503c34bfa99cba1dc804752aca759c4 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -166,10 +166,9 @@ base::DictionaryValue* ExtensionTabUtil::OpenTab(
// -title
// -favIconUrl
- std::string url_string;
GURL url;
if (params.url.get()) {
- url_string = *params.url;
+ std::string url_string= *params.url;
url = ExtensionTabUtil::ResolvePossiblyRelativeURL(
url_string, function->GetExtension());
if (!url.is_valid()) {
@@ -177,6 +176,8 @@ base::DictionaryValue* ExtensionTabUtil::OpenTab(
ErrorUtils::FormatErrorMessage(keys::kInvalidUrlError, url_string);
return NULL;
}
+ } else {
+ url = GURL(chrome::kChromeUINewTabURL);
}
// Don't let extensions crash the browser or renderers.
« no previous file with comments | « chrome/browser/extensions/extension_api_unittest.cc ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698