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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service.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/safe_browsing/safe_browsing_service.cc
===================================================================
--- chrome/browser/safe_browsing/safe_browsing_service.cc (revision 10345)
+++ chrome/browser/safe_browsing/safe_browsing_service.cc (working copy)
@@ -25,6 +25,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
+#include "chrome/common/url_constants.h"
#include "net/base/registry_controlled_domain.h"
using base::Time;
@@ -170,7 +171,8 @@
}
bool SafeBrowsingService::CanCheckUrl(const GURL& url) const {
- return url.SchemeIs("http") || url.SchemeIs("https");
+ return url.SchemeIs(chrome::kHttpScheme) ||
+ url.SchemeIs(chrome::kHttpsScheme);
}
bool SafeBrowsingService::CheckUrl(const GURL& url, Client* client) {
« no previous file with comments | « chrome/browser/renderer_host/renderer_security_policy.cc ('k') | chrome/browser/search_engines/template_url_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698