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

Unified Diff: chrome/browser/search_engines/template_url_model.cc

Issue 31008: Coalesce more hardcoded schemes to using predefined constants. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/search_engines/template_url_model.cc
===================================================================
--- chrome/browser/search_engines/template_url_model.cc (revision 10345)
+++ chrome/browser/search_engines/template_url_model.cc (working copy)
@@ -20,6 +20,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/stl_util-inl.h"
+#include "chrome/common/url_constants.h"
#include "googleurl/src/gurl.h"
#include "googleurl/src/url_parse.h"
#include "grit/locale_settings.h"
@@ -159,7 +160,7 @@
// elements and update AutocompletePopup to look for keywords using the path.
// See http://b/issue?id=863583.
if (!url.is_valid() ||
- (autodetected && (url.has_query() || (url.scheme() != "http") ||
+ (autodetected && (url.has_query() || !url.SchemeIs(chrome::kHttpScheme) ||
((url.path() != "") && (url.path() != "/")))))
return std::wstring();
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service.cc ('k') | chrome/browser/search_engines/template_url_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698