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

Unified Diff: content/browser/renderer_host/allow_cancel_resource_handler.cc

Issue 9113028: Substitute ResourceHandlers with dummy ResourceHandler while request is transferred (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 12 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
Index: content/browser/renderer_host/allow_cancel_resource_handler.cc
diff --git a/content/browser/renderer_host/allow_cancel_resource_handler.cc b/content/browser/renderer_host/allow_cancel_resource_handler.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ba84ebebed5435a1247f9977ae1ad1e795f6325e
--- /dev/null
+++ b/content/browser/renderer_host/allow_cancel_resource_handler.cc
@@ -0,0 +1,81 @@
+// Copyright (c) 2011 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.
+
+#include "content/browser/renderer_host/allow_cancel_resource_handler.h"
+
+#include "base/bind.h"
+#include "chrome/browser/profiles/profile_io_data.h"
+#include "chrome/browser/extensions/extension_info_map.h"
+#include "chrome/common/extensions/extension_process_policy.h"
+#include "content/browser/renderer_host/render_view_host.h"
+#include "content/browser/renderer_host/render_view_host_delegate.h"
+#include "content/browser/renderer_host/resource_dispatcher_host.h"
+#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
+#include "content/public/common/referrer.h"
+
+AllowCancelResourceHandler::AllowCancelResourceHandler() {
+}
+
+AllowCancelResourceHandler::~AllowCancelResourceHandler() {
+}
+
+bool AllowCancelResourceHandler::OnUploadProgress(int request_id,
+ uint64 position,
+ uint64 size) {
+ NOTREACHED();
+ return true;
+}
+
+bool AllowCancelResourceHandler::OnRequestRedirected(
+ int request_id,
+ const GURL& new_url,
+ content::ResourceResponse* response,
+ bool* defer) {
+ NOTREACHED();
+ return true;
+}
+
+bool AllowCancelResourceHandler::OnResponseStarted(
+ int request_id, content::ResourceResponse* response) {
+ NOTREACHED();
+ return true;
+}
+
+bool AllowCancelResourceHandler::OnWillStart(int request_id,
+ const GURL& url,
+ bool* defer) {
+ NOTREACHED();
+ return true;
+}
+
+bool AllowCancelResourceHandler::OnWillRead(int request_id,
+ net::IOBuffer** buf,
+ int* buf_size,
+ int min_size) {
+ NOTREACHED();
+ return true;
+}
+
+bool AllowCancelResourceHandler::OnReadCompleted(int request_id,
+ int* bytes_read) {
+ NOTREACHED();
+ return true;
+}
+
+bool AllowCancelResourceHandler::OnResponseCompleted(
+ int request_id,
+ const net::URLRequestStatus& status,
+ const std::string& security_info) {
+ DCHECK(status.status() == net::URLRequestStatus::CANCELED ||
+ status.status() == net::URLRequestStatus::FAILED);
+ return true;
+}
+
+void AllowCancelResourceHandler::OnRequestClosed() {
+}
+
+void AllowCancelResourceHandler::OnDataDownloaded(int request_id,
+ int bytes_downloaded) {
+ NOTREACHED();
+}

Powered by Google App Engine
This is Rietveld 408576698