| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // The Safe Browsing service is responsible for downloading anti-phishing and | 5 // The Safe Browsing service is responsible for downloading anti-phishing and |
| 6 // anti-malware tables and checking urls against them. | 6 // anti-malware tables and checking urls against them. |
| 7 | 7 |
| 8 #ifndef COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ | 8 #ifndef COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ |
| 9 #define COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ | 9 #define COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "url/gurl.h" | 21 #include "url/gurl.h" |
| 22 | 22 |
| 23 namespace net { | 23 namespace net { |
| 24 class URLRequestContextGetter; | 24 class URLRequestContextGetter; |
| 25 } // namespace net | 25 } // namespace net |
| 26 | 26 |
| 27 namespace safe_browsing { | 27 namespace safe_browsing { |
| 28 | 28 |
| 29 struct V4ProtocolConfig; | 29 struct V4ProtocolConfig; |
| 30 class V4GetHashProtocolManager; | 30 class V4GetHashProtocolManager; |
| 31 class V4UpdateProtocolManager; |
| 31 | 32 |
| 32 // Base class to either the locally-managed or a remotely-managed database. | 33 // Base class to either the locally-managed or a remotely-managed database. |
| 33 class SafeBrowsingDatabaseManager | 34 class SafeBrowsingDatabaseManager |
| 34 : public base::RefCountedThreadSafe<SafeBrowsingDatabaseManager> { | 35 : public base::RefCountedThreadSafe<SafeBrowsingDatabaseManager> { |
| 35 public: | 36 public: |
| 36 // Callers requesting a result should derive from this class. | 37 // Callers requesting a result should derive from this class. |
| 37 // The destructor should call db_manager->CancelCheck(client) if a | 38 // The destructor should call db_manager->CancelCheck(client) if a |
| 38 // request is still pending. | 39 // request is still pending. |
| 39 class Client { | 40 class Client { |
| 40 public: | 41 public: |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 171 |
| 171 protected: | 172 protected: |
| 172 SafeBrowsingDatabaseManager(); | 173 SafeBrowsingDatabaseManager(); |
| 173 | 174 |
| 174 virtual ~SafeBrowsingDatabaseManager(); | 175 virtual ~SafeBrowsingDatabaseManager(); |
| 175 | 176 |
| 176 friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>; | 177 friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>; |
| 177 | 178 |
| 178 // Created and destroyed via StartonIOThread/StopOnIOThread. | 179 // Created and destroyed via StartonIOThread/StopOnIOThread. |
| 179 V4GetHashProtocolManager* v4_get_hash_protocol_manager_; | 180 V4GetHashProtocolManager* v4_get_hash_protocol_manager_; |
| 181 V4UpdateProtocolManager* v4_update_protocol_manager_; |
| 180 }; // class SafeBrowsingDatabaseManager | 182 }; // class SafeBrowsingDatabaseManager |
| 181 | 183 |
| 182 } // namespace safe_browsing | 184 } // namespace safe_browsing |
| 183 | 185 |
| 184 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ | 186 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ |
| OLD | NEW |