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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 void UpdateRequestCompleted( | 122 void UpdateRequestCompleted( |
123 std::unique_ptr<ParsedServerResponse> parsed_server_response); | 123 std::unique_ptr<ParsedServerResponse> parsed_server_response); |
124 | 124 |
125 void SetupUpdateProtocolManager( | 125 void SetupUpdateProtocolManager( |
126 net::URLRequestContextGetter* request_context_getter, | 126 net::URLRequestContextGetter* request_context_getter, |
127 const V4ProtocolConfig& config); | 127 const V4ProtocolConfig& config); |
128 | 128 |
129 void SetupDatabase(); | 129 void SetupDatabase(); |
130 | 130 |
131 // Called when the |v4_get_hash_protocol_manager_| has the full hash response | 131 // Called when the |v4_get_hash_protocol_manager_| has the full hash response |
132 // avaialble for the URL that we requested. It determines the severest | 132 // available for the URL that we requested. It determines the severest |
133 // threat type and responds to the |client| with that information. | 133 // threat type and responds to the |client| with that information. |
134 void OnFullHashResponse(std::unique_ptr<PendingCheck> pending_check, | 134 void OnFullHashResponse(std::unique_ptr<PendingCheck> pending_check, |
135 const std::vector<FullHashInfo>& full_hash_infos); | 135 const std::vector<FullHashInfo>& full_hash_infos); |
136 | 136 |
137 // Called when all the stores managed by the database have been read from | 137 // Called when all the stores managed by the database have been read from |
138 // disk after startup and the database is ready for use. | 138 // disk after startup and the database is ready for use. |
139 void DatabaseReady(std::unique_ptr<V4Database> v4_database); | 139 void DatabaseReady(std::unique_ptr<V4Database> v4_database); |
140 | 140 |
141 // Called when the database has been updated and schedules the next update. | 141 // Called when the database has been updated and schedules the next update. |
142 void DatabaseUpdated(); | 142 void DatabaseUpdated(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 // The sequenced task runner for running safe browsing database operations. | 180 // The sequenced task runner for running safe browsing database operations. |
181 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 181 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
182 | 182 |
183 friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>; | 183 friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>; |
184 DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager); | 184 DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager); |
185 }; // class V4LocalDatabaseManager | 185 }; // class V4LocalDatabaseManager |
186 | 186 |
187 } // namespace safe_browsing | 187 } // namespace safe_browsing |
188 | 188 |
189 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ | 189 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ |
OLD | NEW |