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

Side by Side Diff: chrome/browser/loader/safe_browsing_resource_throttle.h

Issue 2377273004: Reland: Start checking URLs using PVer4. Verdict not returned to client yet. (Closed)
Patch Set: Remove #DEBUG -- it enables these features on Android :-( Created 4 years, 2 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 | « no previous file | chrome/browser/loader/safe_browsing_resource_throttle.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) 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 #ifndef CHROME_BROWSER_LOADER_SAFE_BROWSING_RESOURCE_THROTTLE_H_ 5 #ifndef CHROME_BROWSER_LOADER_SAFE_BROWSING_RESOURCE_THROTTLE_H_
6 #define CHROME_BROWSER_LOADER_SAFE_BROWSING_RESOURCE_THROTTLE_H_ 6 #define CHROME_BROWSER_LOADER_SAFE_BROWSING_RESOURCE_THROTTLE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "base/timer/timer.h" 14 #include "base/timer/timer.h"
15 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 15 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
16 #include "chrome/browser/safe_browsing/ui_manager.h" 16 #include "chrome/browser/safe_browsing/ui_manager.h"
17 #include "components/safe_browsing_db/database_manager.h" 17 #include "components/safe_browsing_db/database_manager.h"
18 #include "content/public/browser/resource_throttle.h" 18 #include "content/public/browser/resource_throttle.h"
19 #include "content/public/common/resource_type.h" 19 #include "content/public/common/resource_type.h"
20 #include "net/log/net_log.h" 20 #include "net/log/net_log.h"
21 #include "net/log/net_log_event_type.h" 21 #include "net/log/net_log_event_type.h"
22 #include "url/gurl.h"
22 23
23 class ResourceDispatcherHost; 24 class ResourceDispatcherHost;
24 25
25 namespace net { 26 namespace net {
26 class URLRequest; 27 class URLRequest;
27 } 28 }
28 29
30 namespace safe_browsing {
31 class V4LocalDatabaseManager;
32 }
33
29 // SafeBrowsingResourceThrottle checks that URLs are "safe" before 34 // SafeBrowsingResourceThrottle checks that URLs are "safe" before
30 // navigating to them. To be considered "safe", a URL must not appear in the 35 // navigating to them. To be considered "safe", a URL must not appear in the
31 // malware/phishing blacklists (see SafeBrowsingService for details). 36 // malware/phishing blacklists (see SafeBrowsingService for details).
32 // 37 //
33 // On desktop (ifdef SAFE_BROWSING_DB_LOCAL) 38 // On desktop (ifdef SAFE_BROWSING_DB_LOCAL)
34 // ----------------------------------------- 39 // -----------------------------------------
35 // This check is done before requesting the original URL, and additionally 40 // This check is done before requesting the original URL, and additionally
36 // before following any subsequent redirect. In the common case the check 41 // before following any subsequent redirect. In the common case the check
37 // completes synchronously (no match in the in-memory DB), so the request's 42 // completes synchronously (no match in the in-memory DB), so the request's
38 // flow is un-interrupted. However if the URL fails this quick check, it 43 // flow is un-interrupted. However if the URL fails this quick check, it
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // If in DEFERRED_UNCHECKED_REDIRECT state, this is the 176 // If in DEFERRED_UNCHECKED_REDIRECT state, this is the
172 // URL we still need to check before resuming. 177 // URL we still need to check before resuming.
173 GURL unchecked_redirect_url_; 178 GURL unchecked_redirect_url_;
174 GURL url_being_checked_; 179 GURL url_being_checked_;
175 180
176 scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> database_manager_; 181 scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> database_manager_;
177 scoped_refptr<safe_browsing::SafeBrowsingUIManager> ui_manager_; 182 scoped_refptr<safe_browsing::SafeBrowsingUIManager> ui_manager_;
178 const net::URLRequest* request_; 183 const net::URLRequest* request_;
179 const content::ResourceType resource_type_; 184 const content::ResourceType resource_type_;
180 net::NetLogWithSource net_log_with_source_; 185 net::NetLogWithSource net_log_with_source_;
186 scoped_refptr<safe_browsing::V4LocalDatabaseManager>
187 v4_local_database_manager_;
181 188
182 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceThrottle); 189 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceThrottle);
183 }; 190 };
184 191
185 #endif // CHROME_BROWSER_LOADER_SAFE_BROWSING_RESOURCE_THROTTLE_H_ 192 #endif // CHROME_BROWSER_LOADER_SAFE_BROWSING_RESOURCE_THROTTLE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/loader/safe_browsing_resource_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698