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_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 virtual scoped_refptr<SafeBrowsingDatabaseManager> database_manager(); | 60 virtual scoped_refptr<SafeBrowsingDatabaseManager> database_manager(); |
61 | 61 |
62 // Returns whether the current page contains a malware or phishing safe | 62 // Returns whether the current page contains a malware or phishing safe |
63 // browsing match. | 63 // browsing match. |
64 bool DidPageReceiveSafeBrowsingMatch() const; | 64 bool DidPageReceiveSafeBrowsingMatch() const; |
65 | 65 |
66 protected: | 66 protected: |
67 explicit ClientSideDetectionHost(content::WebContents* tab); | 67 explicit ClientSideDetectionHost(content::WebContents* tab); |
68 | 68 |
69 // From content::WebContentsObserver. | 69 // From content::WebContentsObserver. |
70 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE; | 70 virtual void WebContentsDestroyed() OVERRIDE; |
71 | 71 |
72 // Used for testing. | 72 // Used for testing. |
73 void set_safe_browsing_managers( | 73 void set_safe_browsing_managers( |
74 SafeBrowsingUIManager* ui_manager, | 74 SafeBrowsingUIManager* ui_manager, |
75 SafeBrowsingDatabaseManager* database_manager); | 75 SafeBrowsingDatabaseManager* database_manager); |
76 | 76 |
77 private: | 77 private: |
78 friend class ClientSideDetectionHostTest; | 78 friend class ClientSideDetectionHostTest; |
79 class ShouldClassifyUrlRequest; | 79 class ShouldClassifyUrlRequest; |
80 friend class ShouldClassifyUrlRequest; | 80 friend class ShouldClassifyUrlRequest; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // as well as the UnsafeResource. | 177 // as well as the UnsafeResource. |
178 int unsafe_unique_page_id_; | 178 int unsafe_unique_page_id_; |
179 scoped_ptr<SafeBrowsingUIManager::UnsafeResource> unsafe_resource_; | 179 scoped_ptr<SafeBrowsingUIManager::UnsafeResource> unsafe_resource_; |
180 | 180 |
181 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost); | 181 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost); |
182 }; | 182 }; |
183 | 183 |
184 } // namespace safe_browsing | 184 } // namespace safe_browsing |
185 | 185 |
186 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ | 186 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ |
OLD | NEW |