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 #ifndef CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ |
7 | 7 |
8 // A class that implements Chrome's interface with the SafeBrowsing protocol. | 8 // A class that implements Chrome's interface with the SafeBrowsing protocol. |
9 // See https://developers.google.com/safe-browsing/developers_guide_v2 for | 9 // See https://developers.google.com/safe-browsing/developers_guide_v2 for |
10 // protocol details. | 10 // protocol details. |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 void UpdateResponseTimeout(); | 276 void UpdateResponseTimeout(); |
277 | 277 |
278 // Called after the chunks are added to the database. | 278 // Called after the chunks are added to the database. |
279 void OnAddChunksComplete(); | 279 void OnAddChunksComplete(); |
280 | 280 |
281 private: | 281 private: |
282 // Map of GetHash requests to parameters which created it. | 282 // Map of GetHash requests to parameters which created it. |
283 struct FullHashDetails { | 283 struct FullHashDetails { |
284 FullHashDetails(); | 284 FullHashDetails(); |
285 FullHashDetails(FullHashCallback callback, bool is_download); | 285 FullHashDetails(FullHashCallback callback, bool is_download); |
| 286 FullHashDetails(const FullHashDetails& other); |
286 ~FullHashDetails(); | 287 ~FullHashDetails(); |
287 | 288 |
288 FullHashCallback callback; | 289 FullHashCallback callback; |
289 bool is_download; | 290 bool is_download; |
290 }; | 291 }; |
291 typedef base::hash_map<const net::URLFetcher*, FullHashDetails> HashRequests; | 292 typedef base::hash_map<const net::URLFetcher*, FullHashDetails> HashRequests; |
292 | 293 |
293 // The factory that controls the creation of SafeBrowsingProtocolManager. | 294 // The factory that controls the creation of SafeBrowsingProtocolManager. |
294 // This is used by tests. | 295 // This is used by tests. |
295 static SBProtocolManagerFactory* factory_; | 296 static SBProtocolManagerFactory* factory_; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 AddChunksCallback callback) = 0; | 436 AddChunksCallback callback) = 0; |
436 | 437 |
437 // Delete chunks from the database. | 438 // Delete chunks from the database. |
438 virtual void DeleteChunks( | 439 virtual void DeleteChunks( |
439 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) = 0; | 440 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) = 0; |
440 }; | 441 }; |
441 | 442 |
442 } // namespace safe_browsing | 443 } // namespace safe_browsing |
443 | 444 |
444 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ | 445 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ |
OLD | NEW |