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 COMPONENTS_SAFE_BROWSING_DB_REMOTE_DATABASE_MANAGER_H_ | 8 #ifndef COMPONENTS_SAFE_BROWSING_DB_REMOTE_DATABASE_MANAGER_H_ |
9 #define COMPONENTS_SAFE_BROWSING_DB_REMOTE_DATABASE_MANAGER_H_ | 9 #define COMPONENTS_SAFE_BROWSING_DB_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/containers/flat_set.h" |
15 #include "base/macros.h" | 16 #include "base/macros.h" |
16 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
17 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
18 #include "components/safe_browsing_db/database_manager.h" | 19 #include "components/safe_browsing_db/database_manager.h" |
19 #include "url/gurl.h" | 20 #include "url/gurl.h" |
20 | 21 |
21 namespace net { | 22 namespace net { |
22 class URLRequestContextGetter; | 23 class URLRequestContextGetter; |
23 } | 24 } |
24 | 25 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // RemoteSafeBrowsingDatabaseManager implementation | 68 // RemoteSafeBrowsingDatabaseManager implementation |
68 // | 69 // |
69 | 70 |
70 private: | 71 private: |
71 ~RemoteSafeBrowsingDatabaseManager() override; | 72 ~RemoteSafeBrowsingDatabaseManager() override; |
72 class ClientRequest; // Per-request tracker. | 73 class ClientRequest; // Per-request tracker. |
73 | 74 |
74 // Requests currently outstanding. This owns the ptrs. | 75 // Requests currently outstanding. This owns the ptrs. |
75 std::vector<ClientRequest*> current_requests_; | 76 std::vector<ClientRequest*> current_requests_; |
76 | 77 |
77 std::set<content::ResourceType> resource_types_to_check_; | 78 base::flat_set<content::ResourceType> resource_types_to_check_; |
78 | 79 |
79 friend class base::RefCountedThreadSafe<RemoteSafeBrowsingDatabaseManager>; | 80 friend class base::RefCountedThreadSafe<RemoteSafeBrowsingDatabaseManager>; |
80 DISALLOW_COPY_AND_ASSIGN(RemoteSafeBrowsingDatabaseManager); | 81 DISALLOW_COPY_AND_ASSIGN(RemoteSafeBrowsingDatabaseManager); |
81 }; // class RemoteSafeBrowsingDatabaseManager | 82 }; // class RemoteSafeBrowsingDatabaseManager |
82 | 83 |
83 } // namespace safe_browsing | 84 } // namespace safe_browsing |
84 | 85 |
85 #endif // COMPONENTS_SAFE_BROWSING_DB_REMOTE_DATABASE_MANAGER_H_ | 86 #endif // COMPONENTS_SAFE_BROWSING_DB_REMOTE_DATABASE_MANAGER_H_ |
OLD | NEW |