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 19 matching lines...) Expand all Loading... |
30 #include "chrome/browser/safe_browsing/safe_browsing_util.h" | 30 #include "chrome/browser/safe_browsing/safe_browsing_util.h" |
31 #include "net/url_request/url_fetcher_delegate.h" | 31 #include "net/url_request/url_fetcher_delegate.h" |
32 #include "net/url_request/url_request_status.h" | 32 #include "net/url_request/url_request_status.h" |
33 #include "url/gurl.h" | 33 #include "url/gurl.h" |
34 | 34 |
35 namespace net { | 35 namespace net { |
36 class URLFetcher; | 36 class URLFetcher; |
37 class URLRequestContextGetter; | 37 class URLRequestContextGetter; |
38 } // namespace net | 38 } // namespace net |
39 | 39 |
| 40 namespace safe_browsing { |
| 41 |
40 class SBProtocolManagerFactory; | 42 class SBProtocolManagerFactory; |
41 class SafeBrowsingProtocolManagerDelegate; | 43 class SafeBrowsingProtocolManagerDelegate; |
42 | 44 |
43 class SafeBrowsingProtocolManager : public net::URLFetcherDelegate, | 45 class SafeBrowsingProtocolManager : public net::URLFetcherDelegate, |
44 public base::NonThreadSafe { | 46 public base::NonThreadSafe { |
45 public: | 47 public: |
46 // FullHashCallback is invoked when GetFullHash completes. | 48 // FullHashCallback is invoked when GetFullHash completes. |
47 // Parameters: | 49 // Parameters: |
48 // - The vector of full hash results. If empty, indicates that there | 50 // - The vector of full hash results. If empty, indicates that there |
49 // were no matches, and that the resource is safe. | 51 // were no matches, and that the resource is safe. |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 // call at a later time. | 434 // call at a later time. |
433 virtual void AddChunks(const std::string& list, | 435 virtual void AddChunks(const std::string& list, |
434 scoped_ptr<ScopedVector<SBChunkData> > chunks, | 436 scoped_ptr<ScopedVector<SBChunkData> > chunks, |
435 AddChunksCallback callback) = 0; | 437 AddChunksCallback callback) = 0; |
436 | 438 |
437 // Delete chunks from the database. | 439 // Delete chunks from the database. |
438 virtual void DeleteChunks( | 440 virtual void DeleteChunks( |
439 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) = 0; | 441 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) = 0; |
440 }; | 442 }; |
441 | 443 |
| 444 } // namespace safe_browsing |
| 445 |
442 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ | 446 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ |
OLD | NEW |