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 CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ | 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ |
9 #define CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ | 9 #define CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ |
10 | 10 |
11 #include <deque> | 11 #include <deque> |
12 #include <map> | 12 #include <map> |
13 #include <set> | 13 #include <set> |
14 #include <string> | 14 #include <string> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "components/safe_browsing_db/util.h" | 18 #include "chrome/browser/safe_browsing/safe_browsing_util.h" |
19 #include "content/public/common/resource_type.h" | 19 #include "content/public/common/resource_type.h" |
20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
21 | 21 |
22 // Interface to either the locally-managed or a remotely-managed database. | 22 // Interface to either the locally-managed or a remotely-managed database. |
23 class SafeBrowsingDatabaseManager | 23 class SafeBrowsingDatabaseManager |
24 : public base::RefCountedThreadSafe<SafeBrowsingDatabaseManager> { | 24 : public base::RefCountedThreadSafe<SafeBrowsingDatabaseManager> { |
25 public: | 25 public: |
26 // Callers requesting a result should derive from this class. | 26 // Callers requesting a result should derive from this class. |
27 // The destructor should call db_manager->CancelCheck(client) if a | 27 // The destructor should call db_manager->CancelCheck(client) if a |
28 // request is still pending. | 28 // request is still pending. |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // on IO thread. If shutdown is true, the manager is disabled permanently. | 128 // on IO thread. If shutdown is true, the manager is disabled permanently. |
129 virtual void StopOnIOThread(bool shutdown) = 0; | 129 virtual void StopOnIOThread(bool shutdown) = 0; |
130 | 130 |
131 protected: | 131 protected: |
132 virtual ~SafeBrowsingDatabaseManager() {} | 132 virtual ~SafeBrowsingDatabaseManager() {} |
133 | 133 |
134 friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>; | 134 friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>; |
135 }; // class SafeBrowsingDatabaseManager | 135 }; // class SafeBrowsingDatabaseManager |
136 | 136 |
137 #endif // CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ | 137 #endif // CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ |
OLD | NEW |