summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing/safe_browsing_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_service.h')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h
index 1d25d53..aec465d 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -52,6 +52,18 @@ class SafeBrowsingService
virtual void OnBlockingPageComplete(bool proceed) = 0;
};
+ // Structure used to pass parameters between the IO and UI thread when
+ // interacting with the blocking page.
+ struct BlockingPageParam {
+ GURL url;
+ bool proceed;
+ UrlCheckResult result;
+ Client* client;
+ int render_process_host_id;
+ int render_view_id;
+ ResourceType::Type resource_type;
+ };
+
// Creates the safe browsing service. Need to initialize before using.
SafeBrowsingService();
~SafeBrowsingService();
@@ -125,9 +137,7 @@ class SafeBrowsingService
void UpdateFinished();
// The blocking page on the UI thread has completed.
- void OnBlockingPageDone(SafeBrowsingBlockingPage* page,
- Client* client,
- bool proceed);
+ void OnBlockingPageDone(const BlockingPageParam& param);
// Called when the SafeBrowsingProtocolManager has received updated MAC keys.
void OnNewMacKeys(const std::string& client_key,
@@ -216,6 +226,9 @@ class SafeBrowsingService
// power state.
void HandleResume();
+ // Invoked on the UI thread to show the blocking page.
+ void DoDisplayBlockingPage(const BlockingPageParam& param);
+
MessageLoop* io_loop_;
typedef std::set<SafeBrowsingCheck*> CurrentChecks;