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 |
11 #include <set> | 11 #include <set> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "chrome/browser/safe_browsing/database_manager.h" | 17 #include "chrome/browser/safe_browsing/database_manager.h" |
18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
19 | 19 |
| 20 namespace safe_browsing { |
| 21 |
20 // An implementation that proxies requests to a service outside of Chromium. | 22 // An implementation that proxies requests to a service outside of Chromium. |
21 // Does not manage a local database. | 23 // Does not manage a local database. |
22 class RemoteSafeBrowsingDatabaseManager : public SafeBrowsingDatabaseManager { | 24 class RemoteSafeBrowsingDatabaseManager : public SafeBrowsingDatabaseManager { |
23 public: | 25 public: |
24 // Construct RemoteSafeBrowsingDatabaseManager. | 26 // Construct RemoteSafeBrowsingDatabaseManager. |
25 // Must be initialized by calling StartOnIOThread() before using. | 27 // Must be initialized by calling StartOnIOThread() before using. |
26 RemoteSafeBrowsingDatabaseManager(); | 28 RemoteSafeBrowsingDatabaseManager(); |
27 | 29 |
28 // | 30 // |
29 // SafeBrowsingDatabaseManager implementation | 31 // SafeBrowsingDatabaseManager implementation |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 std::vector<ClientRequest*> current_requests_; | 67 std::vector<ClientRequest*> current_requests_; |
66 bool enabled_; | 68 bool enabled_; |
67 | 69 |
68 std::set<content::ResourceType> resource_types_to_check_; | 70 std::set<content::ResourceType> resource_types_to_check_; |
69 bool is_android_field_trial_enabled_; | 71 bool is_android_field_trial_enabled_; |
70 | 72 |
71 friend class base::RefCountedThreadSafe<RemoteSafeBrowsingDatabaseManager>; | 73 friend class base::RefCountedThreadSafe<RemoteSafeBrowsingDatabaseManager>; |
72 DISALLOW_COPY_AND_ASSIGN(RemoteSafeBrowsingDatabaseManager); | 74 DISALLOW_COPY_AND_ASSIGN(RemoteSafeBrowsingDatabaseManager); |
73 }; // class RemoteSafeBrowsingDatabaseManager | 75 }; // class RemoteSafeBrowsingDatabaseManager |
74 | 76 |
| 77 } // namespace safe_browsing |
| 78 |
75 #endif // CHROME_BROWSER_SAFE_BROWSING_REMOTE_DATABASE_MANAGER_H_ | 79 #endif // CHROME_BROWSER_SAFE_BROWSING_REMOTE_DATABASE_MANAGER_H_ |
OLD | NEW |