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

Unified Diff: chrome/browser/renderer_host/cross_site_resource_handler.h

Issue 6532073: Move core pieces of browser\renderer_host to src\content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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: chrome/browser/renderer_host/cross_site_resource_handler.h
===================================================================
--- chrome/browser/renderer_host/cross_site_resource_handler.h (revision 75488)
+++ chrome/browser/renderer_host/cross_site_resource_handler.h (working copy)
@@ -6,66 +6,7 @@
#define CHROME_BROWSER_RENDERER_HOST_CROSS_SITE_RESOURCE_HANDLER_H_
#pragma once
-#include "chrome/browser/renderer_host/resource_handler.h"
-#include "net/url_request/url_request_status.h"
+// TODO(jam): remove this file when all files have been converted.
+#include "content/browser/renderer_host/cross_site_resource_handler.h"
-class ResourceDispatcherHost;
-struct GlobalRequestID;
-
-// Ensures that cross-site responses are delayed until the onunload handler of
-// the previous page is allowed to run. This handler wraps an
-// AsyncEventHandler, and it sits inside SafeBrowsing and Buffered event
-// handlers. This is important, so that it can intercept OnResponseStarted
-// after we determine that a response is safe and not a download.
-class CrossSiteResourceHandler : public ResourceHandler {
- public:
- CrossSiteResourceHandler(ResourceHandler* handler,
- int render_process_host_id,
- int render_view_id,
- ResourceDispatcherHost* resource_dispatcher_host);
-
- // ResourceHandler implementation:
- virtual bool OnUploadProgress(int request_id, uint64 position, uint64 size);
- virtual bool OnRequestRedirected(int request_id, const GURL& new_url,
- ResourceResponse* response, bool* defer);
- virtual bool OnResponseStarted(int request_id,
- ResourceResponse* response);
- virtual bool OnWillStart(int request_id, const GURL& url, bool* defer);
- virtual bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size,
- int min_size);
- virtual bool OnReadCompleted(int request_id, int* bytes_read);
- virtual bool OnResponseCompleted(int request_id,
- const net::URLRequestStatus& status,
- const std::string& security_info);
- virtual void OnRequestClosed();
-
- // We can now send the response to the new renderer, which will cause
- // TabContents to swap in the new renderer and destroy the old one.
- void ResumeResponse();
-
- private:
- virtual ~CrossSiteResourceHandler();
-
- // Prepare to render the cross-site response in a new RenderViewHost, by
- // telling the old RenderViewHost to run its onunload handler.
- void StartCrossSiteTransition(
- int request_id,
- ResourceResponse* response,
- const GlobalRequestID& global_id);
-
- scoped_refptr<ResourceHandler> next_handler_;
- int render_process_host_id_;
- int render_view_id_;
- bool has_started_response_;
- bool in_cross_site_transition_;
- int request_id_;
- bool completed_during_transition_;
- net::URLRequestStatus completed_status_;
- std::string completed_security_info_;
- ResourceResponse* response_;
- ResourceDispatcherHost* rdh_;
-
- DISALLOW_COPY_AND_ASSIGN(CrossSiteResourceHandler);
-};
-
#endif // CHROME_BROWSER_RENDERER_HOST_CROSS_SITE_RESOURCE_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698