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

Unified Diff: components/safe_browsing_db/safe_browsing_api_handler.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 ParseJson in test Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: components/safe_browsing_db/safe_browsing_api_handler.h
diff --git a/components/safe_browsing_db/safe_browsing_api_handler.h b/components/safe_browsing_db/safe_browsing_api_handler.h
index 0ffdd6b5b6c0c51e88337595c51fd8004c8f2755..8ec5deb32a8c7e09a9b4af017d74be8d53d87257 100644
--- a/components/safe_browsing_db/safe_browsing_api_handler.h
+++ b/components/safe_browsing_db/safe_browsing_api_handler.h
@@ -24,13 +24,24 @@ class SafeBrowsingApiHandler {
static SafeBrowsingApiHandler* GetInstance();
typedef base::Callback<void(SBThreatType sb_threat_type,
- const std::string& metadata)>
+ const ThreatMetadata& metadata)>
+ URLCheckCallbackMeta;
+
+ // TODO(nparker): Remove this as part of crbug/589610.
+ typedef base::Callback<void(SBThreatType sb_threat_type,
+ const std::string& metadata_str)>
URLCheckCallback;
// Makes Native->Java call and invokes callback when check is done.
+ // TODO(nparker): Switch this back to pure virtual. crbug/589610.
+ virtual void StartURLCheck(const URLCheckCallbackMeta& callback,
+ const GURL& url,
+ const std::vector<SBThreatType>& threat_types);
+
+ // TODO(nparker): Remove this as part of crbug/589610.
virtual void StartURLCheck(const URLCheckCallback& callback,
const GURL& url,
- const std::vector<SBThreatType>& threat_types) = 0;
+ const std::vector<SBThreatType>& threat_types) {};
virtual ~SafeBrowsingApiHandler() {}
« no previous file with comments | « components/safe_browsing_db/remote_database_manager.cc ('k') | components/safe_browsing_db/safe_browsing_api_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698