| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 DEFERRED_REDIRECT, | 88 DEFERRED_REDIRECT, |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 SafeBrowsingResourceHandler(ResourceHandler* handler, | 91 SafeBrowsingResourceHandler(ResourceHandler* handler, |
| 92 int render_process_host_id, | 92 int render_process_host_id, |
| 93 int render_view_id, | 93 int render_view_id, |
| 94 ResourceType::Type resource_type, | 94 ResourceType::Type resource_type, |
| 95 SafeBrowsingService* safe_browsing, | 95 SafeBrowsingService* safe_browsing, |
| 96 ResourceDispatcherHost* resource_dispatcher_host); | 96 ResourceDispatcherHost* resource_dispatcher_host); |
| 97 | 97 |
| 98 ~SafeBrowsingResourceHandler(); | 98 virtual ~SafeBrowsingResourceHandler(); |
| 99 | 99 |
| 100 // Cancels any in progress safe browsing actions. | 100 // Cancels any in progress safe browsing actions. |
| 101 void Shutdown(); | 101 void Shutdown(); |
| 102 | 102 |
| 103 // Starts running |url| through the safe browsing check. Returns true if the | 103 // Starts running |url| through the safe browsing check. Returns true if the |
| 104 // URL is safe to visit. Otherwise returns false and will call | 104 // URL is safe to visit. Otherwise returns false and will call |
| 105 // OnUrlCheckResult() when the check has completed. | 105 // OnUrlCheckResult() when the check has completed. |
| 106 bool CheckUrl(const GURL& url); | 106 bool CheckUrl(const GURL& url); |
| 107 | 107 |
| 108 // Callback for when the safe browsing check (which was initiated by | 108 // Callback for when the safe browsing check (which was initiated by |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 int render_view_id_; | 154 int render_view_id_; |
| 155 scoped_refptr<SafeBrowsingService> safe_browsing_; | 155 scoped_refptr<SafeBrowsingService> safe_browsing_; |
| 156 ResourceDispatcherHost* rdh_; | 156 ResourceDispatcherHost* rdh_; |
| 157 ResourceType::Type resource_type_; | 157 ResourceType::Type resource_type_; |
| 158 | 158 |
| 159 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceHandler); | 159 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceHandler); |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 | 162 |
| 163 #endif // CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_ | 163 #endif // CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_HANDLER_H_ |
| OLD | NEW |