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

Unified Diff: chrome/browser/sessions/session_restore.cc

Issue 2409423005: Compare GURLs to kUrlConstants with .spec() and string equality (Closed)
Patch Set: git cl format Created 4 years, 2 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
Index: chrome/browser/sessions/session_restore.cc
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index 4620241d6de114bb3232cda59b0187a67034d3f3..f1fae0257e72bb8772cb52fdeac3ead0fbb4a6f1 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -773,7 +773,7 @@ void SessionRestore::RestoreSessionAfterCrash(Browser* browser) {
if (browser->tab_strip_model()->count() == 1) {
const content::WebContents* active_tab =
browser->tab_strip_model()->GetWebContentsAt(0);
- if (active_tab->GetURL() == GURL(chrome::kChromeUINewTabURL) ||
+ if (active_tab->GetURL().spec() == chrome::kChromeUINewTabURL ||
search::IsInstantNTP(active_tab)) {
// There is only one tab and its the new tab page, make session restore
// clobber it.

Powered by Google App Engine
This is Rietveld 408576698