| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 const content::ResourceType resource_type); | 121 const content::ResourceType resource_type); |
| 122 | 122 |
| 123 // From NotificationObserver. Called when a notification comes in. This | 123 // From NotificationObserver. Called when a notification comes in. This |
| 124 // method is called in the UI thread. | 124 // method is called in the UI thread. |
| 125 void Observe(int type, | 125 void Observe(int type, |
| 126 const content::NotificationSource& source, | 126 const content::NotificationSource& source, |
| 127 const content::NotificationDetails& details) override; | 127 const content::NotificationDetails& details) override; |
| 128 | 128 |
| 129 // Inherited from WebContentsObserver. This is called once the page is | 129 // Inherited from WebContentsObserver. This is called once the page is |
| 130 // done loading. | 130 // done loading. |
| 131 void DidStopLoading(content::RenderViewHost* rvh) override; | 131 void DidStopLoading() override; |
| 132 | 132 |
| 133 // Returns true if the user has seen a regular SafeBrowsing | 133 // Returns true if the user has seen a regular SafeBrowsing |
| 134 // interstitial for the current page. This is only true if the user has | 134 // interstitial for the current page. This is only true if the user has |
| 135 // actually clicked through the warning. This method is called on the UI | 135 // actually clicked through the warning. This method is called on the UI |
| 136 // thread. | 136 // thread. |
| 137 bool DidShowSBInterstitial() const; | 137 bool DidShowSBInterstitial() const; |
| 138 | 138 |
| 139 // Used for testing. This function does not take ownership of the service | 139 // Used for testing. This function does not take ownership of the service |
| 140 // class. | 140 // class. |
| 141 void set_client_side_detection_service(ClientSideDetectionService* service); | 141 void set_client_side_detection_service(ClientSideDetectionService* service); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 scoped_ptr<SafeBrowsingUIManager::UnsafeResource> unsafe_resource_; | 178 scoped_ptr<SafeBrowsingUIManager::UnsafeResource> unsafe_resource_; |
| 179 | 179 |
| 180 base::WeakPtrFactory<ClientSideDetectionHost> weak_factory_; | 180 base::WeakPtrFactory<ClientSideDetectionHost> weak_factory_; |
| 181 | 181 |
| 182 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost); | 182 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost); |
| 183 }; | 183 }; |
| 184 | 184 |
| 185 } // namespace safe_browsing | 185 } // namespace safe_browsing |
| 186 | 186 |
| 187 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ | 187 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ |
| OLD | NEW |