| OLD | NEW |
| 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_RENDERER_HOST_SAFE_BROWSING_RESOURCE_THROTTLE_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_THROTTLE_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_THROTTLE_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_THROTTLE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 static SafeBrowsingResourceThrottle* MaybeCreate( | 71 static SafeBrowsingResourceThrottle* MaybeCreate( |
| 72 net::URLRequest* request, | 72 net::URLRequest* request, |
| 73 content::ResourceType resource_type, | 73 content::ResourceType resource_type, |
| 74 safe_browsing::SafeBrowsingService* sb_service); | 74 safe_browsing::SafeBrowsingService* sb_service); |
| 75 | 75 |
| 76 // content::ResourceThrottle implementation (called on IO thread): | 76 // content::ResourceThrottle implementation (called on IO thread): |
| 77 void WillStartRequest(bool* defer) override; | 77 void WillStartRequest(bool* defer) override; |
| 78 void WillRedirectRequest(const net::RedirectInfo& redirect_info, | 78 void WillRedirectRequest(const net::RedirectInfo& redirect_info, |
| 79 bool* defer) override; | 79 bool* defer) override; |
| 80 void WillProcessResponse(bool* defer) override; | 80 void WillProcessResponse(bool* defer) override; |
| 81 bool MustProcessResponseBeforeMimeSniffing() override; |
| 81 | 82 |
| 82 const char* GetNameForLogging() const override; | 83 const char* GetNameForLogging() const override; |
| 83 | 84 |
| 84 // SafeBrowsingDabaseManager::Client implementation (called on IO thread): | 85 // SafeBrowsingDabaseManager::Client implementation (called on IO thread): |
| 85 void OnCheckBrowseUrlResult( | 86 void OnCheckBrowseUrlResult( |
| 86 const GURL& url, | 87 const GURL& url, |
| 87 safe_browsing::SBThreatType result, | 88 safe_browsing::SBThreatType result, |
| 88 const safe_browsing::ThreatMetadata& metadata) override; | 89 const safe_browsing::ThreatMetadata& metadata) override; |
| 89 | 90 |
| 90 protected: | 91 protected: |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 174 |
| 174 scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> database_manager_; | 175 scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> database_manager_; |
| 175 scoped_refptr<safe_browsing::SafeBrowsingUIManager> ui_manager_; | 176 scoped_refptr<safe_browsing::SafeBrowsingUIManager> ui_manager_; |
| 176 const net::URLRequest* request_; | 177 const net::URLRequest* request_; |
| 177 const content::ResourceType resource_type_; | 178 const content::ResourceType resource_type_; |
| 178 net::BoundNetLog bound_net_log_; | 179 net::BoundNetLog bound_net_log_; |
| 179 | 180 |
| 180 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceThrottle); | 181 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceThrottle); |
| 181 }; | 182 }; |
| 182 #endif // CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_THROTTLE_H_ | 183 #endif // CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_THROTTLE_H_ |
| OLD | NEW |