| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ | 5 #ifndef COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ |
| 6 #define COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ | 6 #define COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ |
| 7 | 7 |
| 8 // A class that provides the interface between the SafeBrowsing protocol manager | 8 // A class that provides the interface between the SafeBrowsing protocol manager |
| 9 // and database that holds the downloaded updates. | 9 // and database that holds the downloaded updates. |
| 10 | 10 |
| 11 #include <memory> | 11 #include <memory> |
| 12 | 12 |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "components/safe_browsing_db/database_manager.h" | 14 #include "components/safe_browsing_db/database_manager.h" |
| 15 #include "components/safe_browsing_db/hit_report.h" | 15 #include "components/safe_browsing_db/hit_report.h" |
| 16 #include "components/safe_browsing_db/v4_database.h" | 16 #include "components/safe_browsing_db/v4_database.h" |
| 17 #include "components/safe_browsing_db/v4_get_hash_protocol_manager.h" | 17 #include "components/safe_browsing_db/v4_get_hash_protocol_manager.h" |
| 18 #include "components/safe_browsing_db/v4_protocol_manager_util.h" | 18 #include "components/safe_browsing_db/v4_protocol_manager_util.h" |
| 19 #include "components/safe_browsing_db/v4_update_protocol_manager.h" | 19 #include "components/safe_browsing_db/v4_update_protocol_manager.h" |
| 20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 21 | 21 |
| 22 using content::ResourceType; | |
| 23 | |
| 24 namespace safe_browsing { | 22 namespace safe_browsing { |
| 25 | 23 |
| 26 typedef unsigned ThreatSeverity; | 24 typedef unsigned ThreatSeverity; |
| 27 | 25 |
| 28 // Manages the local, on-disk database of updates downloaded from the | 26 // Manages the local, on-disk database of updates downloaded from the |
| 29 // SafeBrowsing service and interfaces with the protocol manager. | 27 // SafeBrowsing service and interfaces with the protocol manager. |
| 30 class V4LocalDatabaseManager : public SafeBrowsingDatabaseManager { | 28 class V4LocalDatabaseManager : public SafeBrowsingDatabaseManager { |
| 31 public: | 29 public: |
| 32 // Create and return an instance of V4LocalDatabaseManager, if Finch trial | 30 // Create and return an instance of V4LocalDatabaseManager, if Finch trial |
| 33 // allows it; nullptr otherwise. | 31 // allows it; nullptr otherwise. |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 285 |
| 288 base::WeakPtrFactory<V4LocalDatabaseManager> weak_factory_; | 286 base::WeakPtrFactory<V4LocalDatabaseManager> weak_factory_; |
| 289 | 287 |
| 290 friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>; | 288 friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>; |
| 291 DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager); | 289 DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager); |
| 292 }; // class V4LocalDatabaseManager | 290 }; // class V4LocalDatabaseManager |
| 293 | 291 |
| 294 } // namespace safe_browsing | 292 } // namespace safe_browsing |
| 295 | 293 |
| 296 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ | 294 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ |
| OLD | NEW |