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

Side by Side Diff: chrome/renderer/safe_browsing/phishing_classifier.cc

Issue 1176583003: Move EqualsASCII to the base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util2
Patch Set: Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « chrome/renderer/net/net_error_helper.cc ('k') | chrome/renderer/web_apps.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/safe_browsing/phishing_classifier.h" 5 #include "chrome/renderer/safe_browsing/phishing_classifier.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 // Check whether the URL is one that we should classify. 120 // Check whether the URL is one that we should classify.
121 // Currently, we only classify http: URLs that are GET requests. 121 // Currently, we only classify http: URLs that are GET requests.
122 GURL url(frame->document().url()); 122 GURL url(frame->document().url());
123 if (!url.SchemeIs(url::kHttpScheme)) { 123 if (!url.SchemeIs(url::kHttpScheme)) {
124 RunFailureCallback(); 124 RunFailureCallback();
125 return; 125 return;
126 } 126 }
127 127
128 blink::WebDataSource* ds = frame->dataSource(); 128 blink::WebDataSource* ds = frame->dataSource();
129 if (!ds || !EqualsASCII(ds->request().httpMethod(), "GET")) { 129 if (!ds || !base::EqualsASCII(ds->request().httpMethod(), "GET")) {
130 RunFailureCallback(); 130 RunFailureCallback();
131 return; 131 return;
132 } 132 }
133 133
134 features_.reset(new FeatureMap); 134 features_.reset(new FeatureMap);
135 if (!url_extractor_->ExtractFeatures(url, features_.get())) { 135 if (!url_extractor_->ExtractFeatures(url, features_.get())) {
136 RunFailureCallback(); 136 RunFailureCallback();
137 return; 137 return;
138 } 138 }
139 139
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 242
243 void PhishingClassifier::Clear() { 243 void PhishingClassifier::Clear() {
244 page_text_ = NULL; 244 page_text_ = NULL;
245 done_callback_.Reset(); 245 done_callback_.Reset();
246 features_.reset(NULL); 246 features_.reset(NULL);
247 shingle_hashes_.reset(NULL); 247 shingle_hashes_.reset(NULL);
248 } 248 }
249 249
250 } // namespace safe_browsing 250 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/renderer/net/net_error_helper.cc ('k') | chrome/renderer/web_apps.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698