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

Unified Diff: chrome/browser/search/search.cc

Issue 2409423005: Compare GURLs to kUrlConstants with .spec() and string equality (Closed)
Patch Set: rebase on dependent patch 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
« no previous file with comments | « chrome/browser/prerender/prerender_manager.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/search/search.cc
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index 98336e62686dfd958dba0aa028ebd3ad0cda95dc..79c0c2396d9719894753b68b3dd90e7f4b1f2673 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -299,12 +299,11 @@ bool IsNTPURL(const GURL& url, Profile* profile) {
return false;
if (!IsInstantExtendedAPIEnabled())
- return url == GURL(chrome::kChromeUINewTabURL);
+ return url == chrome::kChromeUINewTabURL;
const base::string16 search_terms = ExtractSearchTermsFromURL(profile, url);
- return profile &&
- ((IsInstantURL(url, profile) && search_terms.empty()) ||
- url == GURL(chrome::kChromeSearchLocalNtpUrl));
+ return profile && ((IsInstantURL(url, profile) && search_terms.empty()) ||
+ url == chrome::kChromeSearchLocalNtpUrl);
}
bool IsInstantNTP(const content::WebContents* contents) {
@@ -331,7 +330,7 @@ bool IsInstantNTPURL(const GURL& url, Profile* profile) {
if (!IsInstantExtendedAPIEnabled())
return false;
- if (url == GURL(chrome::kChromeSearchLocalNtpUrl))
+ if (url == chrome::kChromeSearchLocalNtpUrl)
return true;
GURL new_tab_url(GetNewTabPageURL(profile));
« no previous file with comments | « chrome/browser/prerender/prerender_manager.cc ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698