| Index: components/safe_browsing_db/safe_browsing_api_handler.cc
|
| diff --git a/components/safe_browsing_db/safe_browsing_api_handler.cc b/components/safe_browsing_db/safe_browsing_api_handler.cc
|
| index fd3c3cee30bbc76f2242bb1e1007d268190abdcf..178a35dacd098a5978e19a953b66bdeb3782f6b3 100644
|
| --- a/components/safe_browsing_db/safe_browsing_api_handler.cc
|
| +++ b/components/safe_browsing_db/safe_browsing_api_handler.cc
|
| @@ -2,10 +2,25 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "base/bind.h"
|
| #include "components/safe_browsing_db/safe_browsing_api_handler.h"
|
|
|
| namespace safe_browsing {
|
|
|
| +namespace {
|
| +
|
| +// TODO(nparker): Remove this as part of crbug/589610.
|
| +void OnRequestDoneShim(
|
| + const SafeBrowsingApiHandler::URLCheckCallbackMeta& callback,
|
| + SBThreatType sb_threat_type,
|
| + const std::string& raw_metadata) {
|
| + ThreatMetadata metadata_struct;
|
| + metadata_struct.raw_metadata = raw_metadata;
|
| + callback.Run(sb_threat_type, metadata_struct);
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| SafeBrowsingApiHandler* SafeBrowsingApiHandler::instance_ = NULL;
|
|
|
| // static
|
| @@ -18,4 +33,14 @@ SafeBrowsingApiHandler* SafeBrowsingApiHandler::GetInstance() {
|
| return instance_;
|
| }
|
|
|
| +// TODO(nparker): Remove this as part of crbug/589610.
|
| +// Default impl since clank/ code doesn't yet support this.
|
| +void SafeBrowsingApiHandler::StartURLCheck(
|
| + const URLCheckCallbackMeta& callback,
|
| + const GURL& url,
|
| + const std::vector<SBThreatType>& threat_types) {
|
| + URLCheckCallback impl_callback = base::Bind(OnRequestDoneShim, callback);
|
| + StartURLCheck(impl_callback, url, threat_types);
|
| +}
|
| +
|
| } // namespace safe_browsing
|
|
|