Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: components/safe_browsing_db/database_manager.h

Issue 1726403006: Switch Safe Browsing's metadata from string to struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix safe_browsing_service_browsertest and update components_tests.gyp Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 25 matching lines...) Expand all
36 // Callers requesting a result should derive from this class. 36 // Callers requesting a result should derive from this class.
37 // The destructor should call db_manager->CancelCheck(client) if a 37 // The destructor should call db_manager->CancelCheck(client) if a
38 // request is still pending. 38 // request is still pending.
39 class Client { 39 class Client {
40 public: 40 public:
41 virtual ~Client() {} 41 virtual ~Client() {}
42 42
43 // Called when the result of checking a browse URL is known. 43 // Called when the result of checking a browse URL is known.
44 virtual void OnCheckBrowseUrlResult(const GURL& url, 44 virtual void OnCheckBrowseUrlResult(const GURL& url,
45 SBThreatType threat_type, 45 SBThreatType threat_type,
46 const std::string& metadata) {} 46 const ThreatMetadata& metadata) {}
47 47
48 // Called when the result of checking a download URL is known. 48 // Called when the result of checking a download URL is known.
49 virtual void OnCheckDownloadUrlResult(const std::vector<GURL>& url_chain, 49 virtual void OnCheckDownloadUrlResult(const std::vector<GURL>& url_chain,
50 SBThreatType threat_type) {} 50 SBThreatType threat_type) {}
51 51
52 // Called when the result of checking a set of extensions is known. 52 // Called when the result of checking a set of extensions is known.
53 virtual void OnCheckExtensionsResult( 53 virtual void OnCheckExtensionsResult(
54 const std::set<std::string>& threats) {} 54 const std::set<std::string>& threats) {}
55 55
56 // Called when the result of checking the API blacklist is known. 56 // Called when the result of checking the API blacklist is known.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>; 176 friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>;
177 177
178 // Created and destroyed via StartonIOThread/StopOnIOThread. 178 // Created and destroyed via StartonIOThread/StopOnIOThread.
179 V4GetHashProtocolManager* v4_get_hash_protocol_manager_; 179 V4GetHashProtocolManager* v4_get_hash_protocol_manager_;
180 }; // class SafeBrowsingDatabaseManager 180 }; // class SafeBrowsingDatabaseManager
181 181
182 } // namespace safe_browsing 182 } // namespace safe_browsing
183 183
184 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_ 184 #endif // COMPONENTS_SAFE_BROWSING_DB_DATABASE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698