OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_APPCACHE_APPCACHE_INTERCEPTOR_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_INTERCEPTOR_H_ |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_INTERCEPTOR_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_INTERCEPTOR_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/public/common/resource_type.h" | 10 #include "content/public/common/resource_type.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 static void GetExtraResponseInfo(net::URLRequest* request, | 37 static void GetExtraResponseInfo(net::URLRequest* request, |
38 int64* cache_id, | 38 int64* cache_id, |
39 GURL* manifest_url); | 39 GURL* manifest_url); |
40 | 40 |
41 // Methods to support cross site navigations. | 41 // Methods to support cross site navigations. |
42 static void PrepareForCrossSiteTransfer(net::URLRequest* request, | 42 static void PrepareForCrossSiteTransfer(net::URLRequest* request, |
43 int old_process_id); | 43 int old_process_id); |
44 static void CompleteCrossSiteTransfer(net::URLRequest* request, | 44 static void CompleteCrossSiteTransfer(net::URLRequest* request, |
45 int new_process_id, | 45 int new_process_id, |
46 int new_host_id); | 46 int new_host_id); |
| 47 static void MaybeCompleteCrossSiteTransferInOldProcess( |
| 48 net::URLRequest* request, |
| 49 int old_process_id); |
47 | 50 |
48 AppCacheInterceptor(); | 51 AppCacheInterceptor(); |
49 ~AppCacheInterceptor() override; | 52 ~AppCacheInterceptor() override; |
50 | 53 |
51 protected: | 54 protected: |
52 // Override from net::URLRequestInterceptor: | 55 // Override from net::URLRequestInterceptor: |
53 net::URLRequestJob* MaybeInterceptRequest( | 56 net::URLRequestJob* MaybeInterceptRequest( |
54 net::URLRequest* request, | 57 net::URLRequest* request, |
55 net::NetworkDelegate* network_delegate) const override; | 58 net::NetworkDelegate* network_delegate) const override; |
56 net::URLRequestJob* MaybeInterceptResponse( | 59 net::URLRequestJob* MaybeInterceptResponse( |
57 net::URLRequest* request, | 60 net::URLRequest* request, |
58 net::NetworkDelegate* network_delegate) const override; | 61 net::NetworkDelegate* network_delegate) const override; |
59 net::URLRequestJob* MaybeInterceptRedirect( | 62 net::URLRequestJob* MaybeInterceptRedirect( |
60 net::URLRequest* request, | 63 net::URLRequest* request, |
61 net::NetworkDelegate* network_delegate, | 64 net::NetworkDelegate* network_delegate, |
62 const GURL& location) const override; | 65 const GURL& location) const override; |
63 | 66 |
64 private: | 67 private: |
65 static void SetHandler(net::URLRequest* request, | 68 static void SetHandler(net::URLRequest* request, |
66 AppCacheRequestHandler* handler); | 69 AppCacheRequestHandler* handler); |
67 static AppCacheRequestHandler* GetHandler(net::URLRequest* request); | 70 static AppCacheRequestHandler* GetHandler(net::URLRequest* request); |
68 | 71 |
69 DISALLOW_COPY_AND_ASSIGN(AppCacheInterceptor); | 72 DISALLOW_COPY_AND_ASSIGN(AppCacheInterceptor); |
70 }; | 73 }; |
71 | 74 |
72 } // namespace content | 75 } // namespace content |
73 | 76 |
74 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_INTERCEPTOR_H_ | 77 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_INTERCEPTOR_H_ |
OLD | NEW |