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 // Called when the database has been updated and schedules the next update. |
| 76 void DatabaseUpdated(); |
76 | 77 |
77 // The base directory under which to create the files that contain hashes. | 78 // The base directory under which to create the files that contain hashes. |
78 const base::FilePath base_path_; | 79 const base::FilePath base_path_; |
79 | 80 |
80 // Whether the service is running. | 81 // Whether the service is running. |
81 bool enabled_; | 82 bool enabled_; |
82 | 83 |
83 // Stores the current status of the lists to download from the SafeBrowsing | 84 // Stores the current status of the lists to download from the SafeBrowsing |
84 // servers. | 85 // servers. |
85 // TODO(vakh): current_list_states_ doesn't really belong here. | 86 // 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. | 97 // The sequenced task runner for running safe browsing database operations. |
97 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 98 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
98 | 99 |
99 friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>; | 100 friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>; |
100 DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager); | 101 DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager); |
101 }; // class V4LocalDatabaseManager | 102 }; // class V4LocalDatabaseManager |
102 | 103 |
103 } // namespace safe_browsing | 104 } // namespace safe_browsing |
104 | 105 |
105 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ | 106 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ |
OLD | NEW |