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 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void UpdateRequestCompleted(const std::vector<ListUpdateResponse>& responses); | 65 void UpdateRequestCompleted(const std::vector<ListUpdateResponse>& responses); |
66 | 66 |
67 void SetupUpdateProtocolManager( | 67 void SetupUpdateProtocolManager( |
68 net::URLRequestContextGetter* request_context_getter, | 68 net::URLRequestContextGetter* request_context_getter, |
69 const V4ProtocolConfig& config); | 69 const V4ProtocolConfig& config); |
70 | 70 |
71 void SetupDatabase(); | 71 void SetupDatabase(); |
72 | 72 |
73 void DatabaseReady(std::unique_ptr<V4Database> v4_database); | 73 void DatabaseReady(std::unique_ptr<V4Database> v4_database); |
74 | 74 |
75 void OnCloseDatabase(); | 75 void PopulateStoreFileNameMap(StoreFileNameMap* store_file_name_map); |
| 76 |
| 77 // At the end of ApplyUpdate method, the V4Database class calls back |
| 78 // DatabaseUpdated which schedules the next update request. |
| 79 void DatabaseUpdated(); |
76 | 80 |
77 // The base directory under which to create the files that contain hashes. | 81 // The base directory under which to create the files that contain hashes. |
78 const base::FilePath base_path_; | 82 const base::FilePath base_path_; |
79 | 83 |
80 // Whether the service is running. | 84 // Whether the service is running. |
81 bool enabled_; | 85 bool enabled_; |
82 | 86 |
83 // Stores the current status of the lists to download from the SafeBrowsing | 87 // Stores the current status of the lists to download from the SafeBrowsing |
84 // servers. | 88 // servers. |
85 // TODO(vakh): current_list_states_ doesn't really belong here. | 89 // TODO(vakh): current_list_states_ doesn't really belong here. |
(...skipping 10 matching lines...) Expand all Loading... |
96 // The sequenced task runner for running safe browsing database operations. | 100 // The sequenced task runner for running safe browsing database operations. |
97 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 101 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
98 | 102 |
99 friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>; | 103 friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>; |
100 DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager); | 104 DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager); |
101 }; // class V4LocalDatabaseManager | 105 }; // class V4LocalDatabaseManager |
102 | 106 |
103 } // namespace safe_browsing | 107 } // namespace safe_browsing |
104 | 108 |
105 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ | 109 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ |
OLD | NEW |