#include "base/metrics/sparse_histogram.h"
#include "base/stl_util.h"
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
+#include "content/browser/appcache/appcache_interceptor.h"
#include "content/browser/appcache/chrome_appcache_service.h"
#include "content/browser/cert_store_impl.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_job_factory.h"
-#include "webkit/browser/appcache/appcache_interceptor.h"
#include "webkit/common/blob/blob_data.h"
#include "webkit/browser/blob/blob_data_handle.h"
#include "webkit/browser/blob/blob_storage_context.h"
if (job_factory->IsHandledURL(url))
return false;
- return delegate_->HandleExternalProtocol(url, info->GetChildID(),
- info->GetRouteID());
+ bool initiated_by_user_gesture =
+ (loader->request()->load_flags() & net::LOAD_MAYBE_USER_GESTURE) != 0;
+ bool handled = delegate_->HandleExternalProtocol(url, info->GetChildID(),
+ info->GetRouteID(),
+ initiated_by_user_gesture);
+ // Consume the user gesture if the external protocol dialog is shown.
+ if (handled)
+ last_user_gesture_time_ = base::TimeTicks();
+ return handled;
}
void ResourceDispatcherHostImpl::DidStartRequest(ResourceLoader* loader) {
void ResourceDispatcherHostImpl::OnInit() {
scheduler_.reset(new ResourceScheduler);
- appcache::AppCacheInterceptor::EnsureRegistered();
+ AppCacheInterceptor::EnsureRegistered();
}
void ResourceDispatcherHostImpl::OnShutdown() {
}
}
- appcache::AppCacheInterceptor::CompleteCrossSiteTransfer(
+ AppCacheInterceptor::CompleteCrossSiteTransfer(
loader->request(),
child_id,
request_data.appcache_host_id);
request_data.resource_type);
// Have the appcache associate its extra info with the request.
- appcache::AppCacheInterceptor::SetExtraRequestInfo(
+ AppCacheInterceptor::SetExtraRequestInfo(
new_request.get(), filter_->appcache_service(), child_id,
request_data.appcache_host_id, request_data.resource_type);