OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_SAFE_BROWSING_SERVICE_H_ | 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
9 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 9 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
10 | 10 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 const std::vector<SBFullHashResult>& full_hashes, | 115 const std::vector<SBFullHashResult>& full_hashes, |
116 bool can_cache); | 116 bool can_cache); |
117 | 117 |
118 // Called on the IO thread. | 118 // Called on the IO thread. |
119 void HandleChunk(const std::string& list, SBChunkList* chunks); | 119 void HandleChunk(const std::string& list, SBChunkList* chunks); |
120 void HandleChunkDelete(std::vector<SBChunkDelete>* chunk_deletes); | 120 void HandleChunkDelete(std::vector<SBChunkDelete>* chunk_deletes); |
121 | 121 |
122 // Update management. Called on the IO thread. | 122 // Update management. Called on the IO thread. |
123 void UpdateStarted(); | 123 void UpdateStarted(); |
124 void UpdateFinished(bool update_succeeded); | 124 void UpdateFinished(bool update_succeeded); |
| 125 // Whether there is an update in progress. Called on the IO thread. |
| 126 bool IsUpdateInProgress() const; |
125 | 127 |
126 // The blocking page on the UI thread has completed. | 128 // The blocking page on the UI thread has completed. |
127 void OnBlockingPageDone(const std::vector<UnsafeResource>& resources, | 129 void OnBlockingPageDone(const std::vector<UnsafeResource>& resources, |
128 bool proceed); | 130 bool proceed); |
129 | 131 |
130 // Called on the UI thread when the SafeBrowsingProtocolManager has received | 132 // Called on the UI thread when the SafeBrowsingProtocolManager has received |
131 // updated MAC keys. | 133 // updated MAC keys. |
132 void OnNewMacKeys(const std::string& client_key, | 134 void OnNewMacKeys(const std::string& client_key, |
133 const std::string& wrapped_key); | 135 const std::string& wrapped_key); |
134 | 136 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 // Indicates if we're in the midst of trying to close the database. If this | 302 // Indicates if we're in the midst of trying to close the database. If this |
301 // is true, nothing on the IO thread should access the database. | 303 // is true, nothing on the IO thread should access the database. |
302 bool closing_database_; | 304 bool closing_database_; |
303 | 305 |
304 std::deque<QueuedCheck> queued_checks_; | 306 std::deque<QueuedCheck> queued_checks_; |
305 | 307 |
306 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService); | 308 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService); |
307 }; | 309 }; |
308 | 310 |
309 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 311 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
OLD | NEW |