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

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

Issue 9808029: Prepending view-source: does not load the source of the userscript. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed extra logging code. Created 8 years, 9 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/buffered_resource_handler.cc
diff --git a/content/browser/renderer_host/buffered_resource_handler.cc b/content/browser/renderer_host/buffered_resource_handler.cc
index 3cfbbbab95f24c3ea06e0ef6bbe0c921a88d3d10..f88197c1d7c0a1407dbdbcc9762c9a7cfbdf849f 100644
--- a/content/browser/renderer_host/buffered_resource_handler.cc
+++ b/content/browser/renderer_host/buffered_resource_handler.cc
@@ -22,6 +22,7 @@
#include "content/public/browser/resource_context.h"
#include "content/public/browser/resource_dispatcher_host_delegate.h"
#include "content/public/common/resource_response.h"
+#include "content/public/common/url_constants.h"
#include "net/base/io_buffer.h"
#include "net/base/mime_sniffer.h"
#include "net/base/mime_util.h"
@@ -348,6 +349,8 @@ bool BufferedResourceHandler::ShouldDownload(bool* need_plugin_list) {
if (need_plugin_list)
*need_plugin_list = false;
std::string type = StringToLowerASCII(response_->mime_type);
+ if (request_->virtual_url().SchemeIs(chrome::kViewSourceScheme))
darin (slow to review) 2012/03/27 03:20:49 while we can solve this bug by passing around the
chebert 2012/03/31 21:03:18 Done.
+ return false;
// First, examine Content-Disposition.
std::string disposition;
« no previous file with comments | « no previous file | content/browser/renderer_host/resource_dispatcher_host_impl.cc » ('j') | content/renderer/render_view_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698