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

Side by Side Diff: content/browser/loader/cross_site_resource_handler.h

Issue 398903002: Plumb redirect info out of net, through content, and into child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: darin comments Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_LOADER_CROSS_SITE_RESOURCE_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_LOADER_CROSS_SITE_RESOURCE_HANDLER_H_
6 #define CONTENT_BROWSER_LOADER_CROSS_SITE_RESOURCE_HANDLER_H_ 6 #define CONTENT_BROWSER_LOADER_CROSS_SITE_RESOURCE_HANDLER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/browser/loader/layered_resource_handler.h" 10 #include "content/browser/loader/layered_resource_handler.h"
(...skipping 13 matching lines...) Expand all
24 // AsyncEventHandler, and it sits inside SafeBrowsing and Buffered event 24 // AsyncEventHandler, and it sits inside SafeBrowsing and Buffered event
25 // handlers. This is important, so that it can intercept OnResponseStarted 25 // handlers. This is important, so that it can intercept OnResponseStarted
26 // after we determine that a response is safe and not a download. 26 // after we determine that a response is safe and not a download.
27 class CrossSiteResourceHandler : public LayeredResourceHandler { 27 class CrossSiteResourceHandler : public LayeredResourceHandler {
28 public: 28 public:
29 CrossSiteResourceHandler(scoped_ptr<ResourceHandler> next_handler, 29 CrossSiteResourceHandler(scoped_ptr<ResourceHandler> next_handler,
30 net::URLRequest* request); 30 net::URLRequest* request);
31 virtual ~CrossSiteResourceHandler(); 31 virtual ~CrossSiteResourceHandler();
32 32
33 // ResourceHandler implementation: 33 // ResourceHandler implementation:
34 virtual bool OnRequestRedirected(const GURL& new_url, 34 virtual bool OnRequestRedirected(const net::RedirectInfo& redirect_info,
35 ResourceResponse* response, 35 ResourceResponse* response,
36 bool* defer) OVERRIDE; 36 bool* defer) OVERRIDE;
37 virtual bool OnResponseStarted(ResourceResponse* response, 37 virtual bool OnResponseStarted(ResourceResponse* response,
38 bool* defer) OVERRIDE; 38 bool* defer) OVERRIDE;
39 virtual bool OnReadCompleted(int bytes_read, 39 virtual bool OnReadCompleted(int bytes_read,
40 bool* defer) OVERRIDE; 40 bool* defer) OVERRIDE;
41 virtual void OnResponseCompleted(const net::URLRequestStatus& status, 41 virtual void OnResponseCompleted(const net::URLRequestStatus& status,
42 const std::string& security_info, 42 const std::string& security_info,
43 bool* defer) OVERRIDE; 43 bool* defer) OVERRIDE;
44 44
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // PostTaskAndReplyWithResult. If a transfer is needed, it goes back to the UI 99 // PostTaskAndReplyWithResult. If a transfer is needed, it goes back to the UI
100 // thread. This can be removed once the code is changed to only do one hop. 100 // thread. This can be removed once the code is changed to only do one hop.
101 base::WeakPtrFactory<CrossSiteResourceHandler> weak_ptr_factory_; 101 base::WeakPtrFactory<CrossSiteResourceHandler> weak_ptr_factory_;
102 102
103 DISALLOW_COPY_AND_ASSIGN(CrossSiteResourceHandler); 103 DISALLOW_COPY_AND_ASSIGN(CrossSiteResourceHandler);
104 }; 104 };
105 105
106 } // namespace content 106 } // namespace content
107 107
108 #endif // CONTENT_BROWSER_LOADER_CROSS_SITE_RESOURCE_HANDLER_H_ 108 #endif // CONTENT_BROWSER_LOADER_CROSS_SITE_RESOURCE_HANDLER_H_
OLDNEW
« no previous file with comments | « content/browser/loader/certificate_resource_handler.cc ('k') | content/browser/loader/cross_site_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698