Chromium Code Reviews| Index: chrome/browser/managed_mode/managed_mode_resource_throttle.cc |
| diff --git a/chrome/browser/managed_mode/managed_mode_resource_throttle.cc b/chrome/browser/managed_mode/managed_mode_resource_throttle.cc |
| index 654dca87238706fd85cb246e2bcd03e2ce67ea5b..c5fe6e1cc289f3d970006e1e2a8b8cdd57d8e0b7 100644 |
| --- a/chrome/browser/managed_mode/managed_mode_resource_throttle.cc |
| +++ b/chrome/browser/managed_mode/managed_mode_resource_throttle.cc |
| @@ -5,12 +5,16 @@ |
| #include "chrome/browser/managed_mode/managed_mode_resource_throttle.h" |
| #include "base/lazy_instance.h" |
| +#include "base/location.h" |
| #include "chrome/browser/managed_mode/managed_mode.h" |
| -#include "chrome/browser/managed_mode/managed_mode_interstitial.h" |
| +#include "chrome/browser/managed_mode/managed_mode_navigation_observer.h" |
| #include "chrome/browser/managed_mode/managed_mode_url_filter.h" |
| +#include "content/public/browser/browser_thread.h" |
| #include "content/public/browser/resource_controller.h" |
| #include "net/url_request/url_request.h" |
| +using content::BrowserThread; |
| + |
| namespace { |
| // Uniquely identifies a tab, used to set a temporary exception on it. |
| @@ -44,7 +48,7 @@ struct TemporaryExceptionData { |
| typedef std::map<WebContentsId, TemporaryExceptionData> PreviewMap; |
| base::LazyInstance<PreviewMap> g_in_preview_mode = LAZY_INSTANCE_INITIALIZER; |
| -} |
| +} // namespace |
| ManagedModeResourceThrottle::ManagedModeResourceThrottle( |
| const net::URLRequest* request, |
| @@ -127,10 +131,13 @@ void ManagedModeResourceThrottle::ShowInterstitialIfNeeded(bool is_redirect, |
| } |
| *defer = true; |
| - ManagedModeInterstitial::ShowInterstitial( |
| - render_process_host_id_, render_view_id_, url, |
| - base::Bind(&ManagedModeResourceThrottle::OnInterstitialResult, |
| - weak_ptr_factory_.GetWeakPtr())); |
| + |
| + BrowserThread::PostTask( |
| + BrowserThread::UI, FROM_HERE, |
| + base::Bind(&ManagedModeNavigationObserver::DidBlockRequest, |
| + render_process_host_id_, render_view_id_, url, |
|
Adrian Kuegel
2013/03/28 14:28:34
Could |render_view_id_| and |url| be in an extra l
Bernhard Bauer
2013/03/28 15:03:30
See my comments in https://codereview.chromium.org
Adrian Kuegel
2013/03/28 15:11:11
I think it is readable enough as it is.
|
| + base::Bind(&ManagedModeResourceThrottle::OnInterstitialResult, |
| + weak_ptr_factory_.GetWeakPtr()))); |
| } |
| void ManagedModeResourceThrottle::WillStartRequest(bool* defer) { |