Chromium Code Reviews| Index: components/safe_browsing_db/database_manager.h |
| diff --git a/components/safe_browsing_db/database_manager.h b/components/safe_browsing_db/database_manager.h |
| index 018bf15ba546c50f70aed9aead221bb112692f65..48693a44440888f10faa4a99e253053bdf092b45 100644 |
| --- a/components/safe_browsing_db/database_manager.h |
| +++ b/components/safe_browsing_db/database_manager.h |
| @@ -196,12 +196,14 @@ class SafeBrowsingDatabaseManager |
| // Called to initialize objects that are used on the io_thread, such as the |
| // v4 protocol manager. This may be called multiple times during the life of |
| - // the DatabaseManager. Must be called on IO thread. |
| + // the DatabaseManager. Must be called on IO thread. All subclasses should |
| + // override this method and set enabled_ to true. |
|
Nathan Parker
2017/01/24 22:51:03
... and call the base class method at the top of i
kcarattini
2017/01/25 00:19:00
Done.
|
| virtual void StartOnIOThread( |
| net::URLRequestContextGetter* request_context_getter, |
| const V4ProtocolConfig& config); |
| - // Called to stop or shutdown operations on the io_thread. |
| + // Called to stop or shutdown operations on the io_thread. All subclasses |
| + // should override this method and set enabled_ to false. |
| virtual void StopOnIOThread(bool shutdown); |
| protected: |
| @@ -262,6 +264,10 @@ class SafeBrowsingDatabaseManager |
| // responsible for deleting them when removing from the set. |
| ApiCheckSet api_checks_; |
| + // Whether the service is running. 'enabled_' is used by the |
| + // SafeBrowsingDatabaseManager on the IO thread during normal operations. |
| + bool enabled_; |
| + |
| // Created and destroyed via StartOnIOThread/StopOnIOThread. |
| std::unique_ptr<V4GetHashProtocolManager> v4_get_hash_protocol_manager_; |