OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_BROWSER_LOADER_TRANSFER_NAVIGATION_RESOURCE_THROTTLE_H_ | |
6 #define CONTENT_BROWSER_LOADER_TRANSFER_NAVIGATION_RESOURCE_THROTTLE_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/compiler_specific.h" | |
10 #include "content/public/browser/resource_throttle.h" | |
11 | |
12 namespace net { | |
13 class URLRequest; | |
14 } | |
15 | |
16 namespace content { | |
17 | |
18 // This ResourceThrottle checks whether a navigation redirect will cause a | |
19 // renderer process swap. When that happens, we remember the request so | |
20 // that we can transfer it to be handled by the new renderer. This fixes | |
21 // http://crbug.com/79520 | |
22 class TransferNavigationResourceThrottle : public ResourceThrottle { | |
23 public: | |
24 explicit TransferNavigationResourceThrottle(net::URLRequest* request); | |
25 virtual ~TransferNavigationResourceThrottle(); | |
26 | |
27 // ResourceThrottle implementation: | |
28 virtual void WillRedirectRequest(const GURL& new_url, bool* defer) OVERRIDE; | |
29 | |
30 private: | |
31 net::URLRequest* request_; | |
32 | |
33 DISALLOW_COPY_AND_ASSIGN(TransferNavigationResourceThrottle); | |
34 }; | |
35 | |
36 } // namespace content | |
37 | |
38 #endif // CONTENT_BROWSER_LOADER_TRANSFER_NAVIGATION_RESOURCE_THROTTLE_H_ | |
OLD | NEW |