| 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 // The Safe Browsing service is responsible for downloading anti-phishing and | 5 // The Safe Browsing service is responsible for downloading anti-phishing and |
| 6 // anti-malware tables and checking urls against them. | 6 // anti-malware tables and checking urls against them. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ | 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ |
| 9 #define CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ | 9 #define CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ |
| 10 | 10 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // Add and remove observers. These methods must be invoked on the UI thread. | 151 // Add and remove observers. These methods must be invoked on the UI thread. |
| 152 void AddObserver(Observer* observer); | 152 void AddObserver(Observer* observer); |
| 153 void RemoveObserver(Observer* remove); | 153 void RemoveObserver(Observer* remove); |
| 154 | 154 |
| 155 protected: | 155 protected: |
| 156 virtual ~SafeBrowsingUIManager(); | 156 virtual ~SafeBrowsingUIManager(); |
| 157 | 157 |
| 158 private: | 158 private: |
| 159 friend class base::RefCountedThreadSafe<SafeBrowsingUIManager>; | 159 friend class base::RefCountedThreadSafe<SafeBrowsingUIManager>; |
| 160 friend class SafeBrowsingUIManagerTest; | 160 friend class SafeBrowsingUIManagerTest; |
| 161 friend class TestSafeBrowsingUIManager; |
| 161 | 162 |
| 162 // Call protocol manager on IO thread to report hits of unsafe contents. | 163 // Call protocol manager on IO thread to report hits of unsafe contents. |
| 163 void ReportSafeBrowsingHitOnIOThread( | 164 void ReportSafeBrowsingHitOnIOThread( |
| 164 const safe_browsing::HitReport& hit_report); | 165 const safe_browsing::HitReport& hit_report); |
| 165 | 166 |
| 166 // Sends an invalid certificate chain report over the network. | 167 // Sends an invalid certificate chain report over the network. |
| 167 void ReportInvalidCertificateChainOnIOThread( | 168 void ReportInvalidCertificateChainOnIOThread( |
| 168 const std::string& serialized_report); | 169 const std::string& serialized_report); |
| 169 | 170 |
| 170 // Updates the whitelist state. Called on the UI thread. | 171 // Updates the whitelist state. Called on the UI thread. |
| 171 void AddToWhitelist(const UnsafeResource& resource); | 172 void AddToWhitelist(const UnsafeResource& resource); |
| 172 | 173 |
| 173 // Safebrowsing service. | 174 // Safebrowsing service. |
| 174 scoped_refptr<SafeBrowsingService> sb_service_; | 175 scoped_refptr<SafeBrowsingService> sb_service_; |
| 175 | 176 |
| 176 base::ObserverList<Observer> observer_list_; | 177 base::ObserverList<Observer> observer_list_; |
| 177 | 178 |
| 178 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingUIManager); | 179 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingUIManager); |
| 179 }; | 180 }; |
| 180 | 181 |
| 181 } // namespace safe_browsing | 182 } // namespace safe_browsing |
| 182 | 183 |
| 183 #endif // CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ | 184 #endif // CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ |
| OLD | NEW |