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

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

Issue 10796033: Move files related to registry-controlled domains into a new net/base/registry_controlled_domains/ … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Update checkout Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_url_feature_extractor.h" 5 #include "chrome/renderer/safe_browsing/phishing_url_feature_extractor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/perftimer.h" 12 #include "base/perftimer.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/string_split.h" 14 #include "base/string_split.h"
15 #include "base/string_util.h" 15 #include "base/string_util.h"
16 #include "chrome/renderer/safe_browsing/features.h" 16 #include "chrome/renderer/safe_browsing/features.h"
17 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
18 #include "net/base/registry_controlled_domain.h" 18 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
19 19
20 namespace safe_browsing { 20 namespace safe_browsing {
21 21
22 PhishingUrlFeatureExtractor::PhishingUrlFeatureExtractor() {} 22 PhishingUrlFeatureExtractor::PhishingUrlFeatureExtractor() {}
23 23
24 PhishingUrlFeatureExtractor::~PhishingUrlFeatureExtractor() {} 24 PhishingUrlFeatureExtractor::~PhishingUrlFeatureExtractor() {}
25 25
26 bool PhishingUrlFeatureExtractor::ExtractFeatures(const GURL& url, 26 bool PhishingUrlFeatureExtractor::ExtractFeatures(const GURL& url,
27 FeatureMap* features) { 27 FeatureMap* features) {
28 PerfTimer timer; 28 PerfTimer timer;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // Copy over only the splits that are 3 or more chars long. 112 // Copy over only the splits that are 3 or more chars long.
113 // TODO(bryner): Determine a meaningful min size. 113 // TODO(bryner): Determine a meaningful min size.
114 for (std::vector<std::string>::iterator it = raw_splits.begin(); 114 for (std::vector<std::string>::iterator it = raw_splits.begin();
115 it != raw_splits.end(); ++it) { 115 it != raw_splits.end(); ++it) {
116 if (it->length() >= kMinPathComponentLength) 116 if (it->length() >= kMinPathComponentLength)
117 tokens->push_back(*it); 117 tokens->push_back(*it);
118 } 118 }
119 } 119 }
120 120
121 } // namespace safe_browsing 121 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc ('k') | chrome_frame/ready_mode/ready_mode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698