diff options
Diffstat (limited to 'chromium/components/safe_browsing/android/safe_browsing_api_handler.h')
-rw-r--r-- | chromium/components/safe_browsing/android/safe_browsing_api_handler.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/chromium/components/safe_browsing/android/safe_browsing_api_handler.h b/chromium/components/safe_browsing/android/safe_browsing_api_handler.h deleted file mode 100644 index 51fcb763cd3..00000000000 --- a/chromium/components/safe_browsing/android/safe_browsing_api_handler.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// Glue to pass Safe Browsing API requests between -// RemoteSafeBrowsingDatabaseManager and Java-based API to check URLs. - -#ifndef COMPONENTS_SAFE_BROWSING_ANDROID_SAFE_BROWSING_API_HANDLER_H_ -#define COMPONENTS_SAFE_BROWSING_ANDROID_SAFE_BROWSING_API_HANDLER_H_ - -#include <memory> - -#include "base/callback.h" -#include "components/safe_browsing/core/browser/db/util.h" -#include "components/safe_browsing/core/browser/db/v4_protocol_manager_util.h" -#include "url/gurl.h" - -namespace safe_browsing { - -class SafeBrowsingApiHandler { - public: - // Singleton interface. - static void SetInstance(SafeBrowsingApiHandler* instance); - static SafeBrowsingApiHandler* GetInstance(); - - typedef base::OnceCallback<void(SBThreatType sb_threat_type, - const ThreatMetadata& metadata)> - URLCheckCallbackMeta; - - // Makes Native->Java call and invokes callback when check is done. - virtual void StartURLCheck(std::unique_ptr<URLCheckCallbackMeta> callback, - const GURL& url, - const SBThreatTypeSet& threat_types) = 0; - - virtual bool StartCSDAllowlistCheck(const GURL& url) = 0; - - virtual bool StartHighConfidenceAllowlistCheck(const GURL& url) = 0; - - virtual ~SafeBrowsingApiHandler() {} - - private: - // Pointer not owned. - static SafeBrowsingApiHandler* instance_; -}; - -} // namespace safe_browsing - -#endif // COMPONENTS_SAFE_BROWSING_ANDROID_SAFE_BROWSING_API_HANDLER_H_ |