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

Unified Diff: android_webview/browser/aw_safe_browsing_resource_throttle.h

Issue 2876473003: [ABANDONED] [WIP] Refactor SafeBrowsingResourceThrottle in preparation for WebSocket (Closed)
Patch Set: Minor fixes Created 3 years, 6 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
« no previous file with comments | « no previous file | android_webview/browser/aw_safe_browsing_resource_throttle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/aw_safe_browsing_resource_throttle.h
diff --git a/android_webview/browser/aw_safe_browsing_resource_throttle.h b/android_webview/browser/aw_safe_browsing_resource_throttle.h
index 5fbd4dd81e525d7916d05c8909e2973bc02bfcf9..a82408a12eba66bc8ef4aad550246a1dfd315681 100644
--- a/android_webview/browser/aw_safe_browsing_resource_throttle.h
+++ b/android_webview/browser/aw_safe_browsing_resource_throttle.h
@@ -5,45 +5,33 @@
#ifndef ANDROID_WEBVIEW_BROWSER_AW_SAFE_BROWSING_RESOURCE_THROTTLE_H_
#define ANDROID_WEBVIEW_BROWSER_AW_SAFE_BROWSING_RESOURCE_THROTTLE_H_
-#include "android_webview/browser/aw_safe_browsing_ui_manager.h"
-#include "base/macros.h"
-#include "components/safe_browsing/base_resource_throttle.h"
-#include "components/safe_browsing_db/database_manager.h"
-#include "components/security_interstitials/content/unsafe_resource.h"
+#include <memory>
+
+#include "base/memory/ref_counted.h"
#include "content/public/common/resource_type.h"
+namespace content {
+class ResourceThrottle;
+}
+
namespace net {
class URLRequest;
}
+namespace safe_browsing {
+class SafeBrowsingDatabaseManager;
+}
+
namespace android_webview {
-class AwSafeBrowsingResourceThrottle
- : public safe_browsing::BaseResourceThrottle {
- public:
- // Will construct an AwSafeBrowsingResourceThrottle if GMS exists on device
- // and supports safebrowsing.
- static AwSafeBrowsingResourceThrottle* MaybeCreate(
- net::URLRequest* request,
- content::ResourceType resource_type,
- scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager>
- database_manager,
- scoped_refptr<AwSafeBrowsingUIManager> ui_manager);
-
- private:
- AwSafeBrowsingResourceThrottle(
- net::URLRequest* request,
- content::ResourceType resource_type,
- scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager>
- database_manager,
- scoped_refptr<AwSafeBrowsingUIManager> ui_manager);
-
- ~AwSafeBrowsingResourceThrottle() override;
-
- void CancelResourceLoad() override;
-
- DISALLOW_COPY_AND_ASSIGN(AwSafeBrowsingResourceThrottle);
-};
+class AwSafeBrowsingUIManager;
+
+std::unique_ptr<content::ResourceThrottle>
+MaybeCreateAwSafeBrowsingResourceThrottle(
+ net::URLRequest* request,
+ content::ResourceType resource_type,
+ scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> database_manager,
+ scoped_refptr<AwSafeBrowsingUIManager> ui_manager);
} // namespace android_webview
« no previous file with comments | « no previous file | android_webview/browser/aw_safe_browsing_resource_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698