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