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

Side by Side Diff: chrome/browser/safe_browsing/browser_feature_extractor.cc

Issue 370833002: Move resource_type.* from webkit/ to content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chromeos fix Created 6 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) 2012 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/browser/safe_browsing/browser_feature_extractor.h" 5 #include "chrome/browser/safe_browsing/browser_feature_extractor.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 13 matching lines...) Expand all
24 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
25 #include "content/public/browser/navigation_controller.h" 25 #include "content/public/browser/navigation_controller.h"
26 #include "content/public/browser/navigation_entry.h" 26 #include "content/public/browser/navigation_entry.h"
27 #include "content/public/browser/web_contents.h" 27 #include "content/public/browser/web_contents.h"
28 #include "content/public/common/page_transition_types.h" 28 #include "content/public/common/page_transition_types.h"
29 #include "url/gurl.h" 29 #include "url/gurl.h"
30 30
31 using content::BrowserThread; 31 using content::BrowserThread;
32 using content::NavigationController; 32 using content::NavigationController;
33 using content::NavigationEntry; 33 using content::NavigationEntry;
34 using content::ResourceType;
34 using content::WebContents; 35 using content::WebContents;
35 36
36 namespace safe_browsing { 37 namespace safe_browsing {
37 38
38 namespace { 39 namespace {
39 40
40 const int kMaxMalwareIPPerRequest = 5; 41 const int kMaxMalwareIPPerRequest = 5;
41 42
42 void FilterBenignIpsOnIOThread( 43 void FilterBenignIpsOnIOThread(
43 scoped_refptr<SafeBrowsingDatabaseManager> database_manager, 44 scoped_refptr<SafeBrowsingDatabaseManager> database_manager,
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 // Limit the number of matched bad IPs in one request to control 481 // Limit the number of matched bad IPs in one request to control
481 // the request's size 482 // the request's size
482 if (matched_bad_ips >= kMaxMalwareIPPerRequest) { 483 if (matched_bad_ips >= kMaxMalwareIPPerRequest) {
483 break; 484 break;
484 } 485 }
485 } 486 }
486 callback.Run(true, request.Pass()); 487 callback.Run(true, request.Pass());
487 } 488 }
488 489
489 } // namespace safe_browsing 490 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698