| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 static SafeBrowsingProtocolManager* Create( | 76 static SafeBrowsingProtocolManager* Create( |
| 77 SafeBrowsingProtocolManagerDelegate* delegate, | 77 SafeBrowsingProtocolManagerDelegate* delegate, |
| 78 net::URLRequestContextGetter* request_context_getter, | 78 net::URLRequestContextGetter* request_context_getter, |
| 79 const SafeBrowsingProtocolConfig& config); | 79 const SafeBrowsingProtocolConfig& config); |
| 80 | 80 |
| 81 // Sets up the update schedule and internal state for making periodic requests | 81 // Sets up the update schedule and internal state for making periodic requests |
| 82 // of the Safebrowsing servers. | 82 // of the Safebrowsing servers. |
| 83 virtual void Initialize(); | 83 virtual void Initialize(); |
| 84 | 84 |
| 85 // net::URLFetcherDelegate interface. | 85 // net::URLFetcherDelegate interface. |
| 86 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 86 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; |
| 87 | 87 |
| 88 // Retrieve the full hash for a set of prefixes, and invoke the callback | 88 // Retrieve the full hash for a set of prefixes, and invoke the callback |
| 89 // argument when the results are retrieved. The callback may be invoked | 89 // argument when the results are retrieved. The callback may be invoked |
| 90 // synchronously. | 90 // synchronously. |
| 91 virtual void GetFullHash(const std::vector<SBPrefix>& prefixes, | 91 virtual void GetFullHash(const std::vector<SBPrefix>& prefixes, |
| 92 FullHashCallback callback, | 92 FullHashCallback callback, |
| 93 bool is_download); | 93 bool is_download); |
| 94 | 94 |
| 95 // Forces the start of next update after |interval| time. | 95 // Forces the start of next update after |interval| time. |
| 96 void ForceScheduleNextUpdate(base::TimeDelta interval); | 96 void ForceScheduleNextUpdate(base::TimeDelta interval); |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 virtual void AddChunks(const std::string& list, | 445 virtual void AddChunks(const std::string& list, |
| 446 scoped_ptr<ScopedVector<SBChunkData> > chunks, | 446 scoped_ptr<ScopedVector<SBChunkData> > chunks, |
| 447 AddChunksCallback callback) = 0; | 447 AddChunksCallback callback) = 0; |
| 448 | 448 |
| 449 // Delete chunks from the database. | 449 // Delete chunks from the database. |
| 450 virtual void DeleteChunks( | 450 virtual void DeleteChunks( |
| 451 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) = 0; | 451 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) = 0; |
| 452 }; | 452 }; |
| 453 | 453 |
| 454 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ | 454 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ |
| OLD | NEW |