| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Implementation of the SafeBrowsingDatabaseManager that sends URLs | 5 // Implementation of the SafeBrowsingDatabaseManager that sends URLs |
| 6 // via IPC to a database that chromium doesn't manage locally. | 6 // via IPC to a database that chromium doesn't manage locally. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_REMOTE_DATABASE_MANAGER_H_ | 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_REMOTE_DATABASE_MANAGER_H_ |
| 9 #define CHROME_BROWSER_SAFE_BROWSING_REMOTE_DATABASE_MANAGER_H_ | 9 #define CHROME_BROWSER_SAFE_BROWSING_REMOTE_DATABASE_MANAGER_H_ |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class RemoteSafeBrowsingDatabaseManager : public SafeBrowsingDatabaseManager { | 22 class RemoteSafeBrowsingDatabaseManager : public SafeBrowsingDatabaseManager { |
| 23 public: | 23 public: |
| 24 // Construct RemoteSafeBrowsingDatabaseManager. | 24 // Construct RemoteSafeBrowsingDatabaseManager. |
| 25 // Must be initialized by calling StartOnIOThread() before using. | 25 // Must be initialized by calling StartOnIOThread() before using. |
| 26 RemoteSafeBrowsingDatabaseManager(); | 26 RemoteSafeBrowsingDatabaseManager(); |
| 27 | 27 |
| 28 // | 28 // |
| 29 // SafeBrowsingDatabaseManager implementation | 29 // SafeBrowsingDatabaseManager implementation |
| 30 // | 30 // |
| 31 | 31 |
| 32 bool IsSupported() const override; |
| 32 bool CanCheckUrl(const GURL& url) const override; | 33 bool CanCheckUrl(const GURL& url) const override; |
| 33 bool download_protection_enabled() const override; | 34 bool download_protection_enabled() const override; |
| 34 bool CheckBrowseUrl(const GURL& url, Client* client) override; | 35 bool CheckBrowseUrl(const GURL& url, Client* client) override; |
| 35 void CancelCheck(Client* client) override; | 36 void CancelCheck(Client* client) override; |
| 36 void StartOnIOThread() override; | 37 void StartOnIOThread() override; |
| 37 void StopOnIOThread(bool shutdown) override; | 38 void StopOnIOThread(bool shutdown) override; |
| 38 | 39 |
| 39 // These will fail with DCHECK() since their functionality isn't implemented. | 40 // These will fail with DCHECK() since their functionality isn't implemented. |
| 40 // We may later add support for a subset of them. | 41 // We may later add support for a subset of them. |
| 41 bool CheckDownloadUrl(const std::vector<GURL>& url_chain, | 42 bool CheckDownloadUrl(const std::vector<GURL>& url_chain, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 60 | 61 |
| 61 // Requests currently outstanding. This owns the ptrs. | 62 // Requests currently outstanding. This owns the ptrs. |
| 62 std::vector<ClientRequest*> current_requests_; | 63 std::vector<ClientRequest*> current_requests_; |
| 63 bool enabled_; | 64 bool enabled_; |
| 64 | 65 |
| 65 friend class base::RefCountedThreadSafe<RemoteSafeBrowsingDatabaseManager>; | 66 friend class base::RefCountedThreadSafe<RemoteSafeBrowsingDatabaseManager>; |
| 66 DISALLOW_COPY_AND_ASSIGN(RemoteSafeBrowsingDatabaseManager); | 67 DISALLOW_COPY_AND_ASSIGN(RemoteSafeBrowsingDatabaseManager); |
| 67 }; // class RemoteSafeBrowsingDatabaseManager | 68 }; // class RemoteSafeBrowsingDatabaseManager |
| 68 | 69 |
| 69 #endif // CHROME_BROWSER_SAFE_BROWSING_REMOTE_DATABASE_MANAGER_H_ | 70 #endif // CHROME_BROWSER_SAFE_BROWSING_REMOTE_DATABASE_MANAGER_H_ |
| OLD | NEW |