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

Side by Side Diff: content/browser/appcache/appcache_request_handler.h

Issue 702843004: Transfer serviceworker state during cross site navigations too. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_REQUEST_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/supports_user_data.h" 9 #include "base/supports_user_data.h"
10 #include "content/browser/appcache/appcache_entry.h" 10 #include "content/browser/appcache/appcache_entry.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 net::NetworkDelegate* network_delegate, 42 net::NetworkDelegate* network_delegate,
43 const GURL& location); 43 const GURL& location);
44 AppCacheURLRequestJob* MaybeLoadFallbackForResponse( 44 AppCacheURLRequestJob* MaybeLoadFallbackForResponse(
45 net::URLRequest* request, net::NetworkDelegate* network_delegate); 45 net::URLRequest* request, net::NetworkDelegate* network_delegate);
46 46
47 void GetExtraResponseInfo(int64* cache_id, GURL* manifest_url); 47 void GetExtraResponseInfo(int64* cache_id, GURL* manifest_url);
48 48
49 // Methods to support cross site navigations. 49 // Methods to support cross site navigations.
50 void PrepareForCrossSiteTransfer(int old_process_id); 50 void PrepareForCrossSiteTransfer(int old_process_id);
51 void CompleteCrossSiteTransfer(int new_process_id, int new_host_id); 51 void CompleteCrossSiteTransfer(int new_process_id, int new_host_id);
52 void MaybeCompleteCrossSiteTransferInOldProcess(int old_process_id);
52 53
53 static bool IsMainResourceType(ResourceType type) { 54 static bool IsMainResourceType(ResourceType type) {
54 return IsResourceTypeFrame(type) || 55 return IsResourceTypeFrame(type) ||
55 type == RESOURCE_TYPE_SHARED_WORKER; 56 type == RESOURCE_TYPE_SHARED_WORKER;
56 } 57 }
57 58
58 private: 59 private:
59 friend class AppCacheHost; 60 friend class AppCacheHost;
60 61
61 // Callers should use AppCacheHost::CreateRequestHandler. 62 // Callers should use AppCacheHost::CreateRequestHandler.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 139
139 // True if this->MaybeLoadResource(...) has been called in the past. 140 // True if this->MaybeLoadResource(...) has been called in the past.
140 bool maybe_load_resource_executed_; 141 bool maybe_load_resource_executed_;
141 142
142 // The job we use to deliver a response. 143 // The job we use to deliver a response.
143 scoped_refptr<AppCacheURLRequestJob> job_; 144 scoped_refptr<AppCacheURLRequestJob> job_;
144 145
145 // During a cross site navigation, we transfer ownership the AppcacheHost 146 // During a cross site navigation, we transfer ownership the AppcacheHost
146 // from the old processes structures over to the new structures. 147 // from the old processes structures over to the new structures.
147 scoped_ptr<AppCacheHost> host_for_cross_site_transfer_; 148 scoped_ptr<AppCacheHost> host_for_cross_site_transfer_;
149 int old_process_id_;
150 int old_host_id_;
148 151
149 friend class content::AppCacheRequestHandlerTest; 152 friend class content::AppCacheRequestHandlerTest;
150 DISALLOW_COPY_AND_ASSIGN(AppCacheRequestHandler); 153 DISALLOW_COPY_AND_ASSIGN(AppCacheRequestHandler);
151 }; 154 };
152 155
153 } // namespace content 156 } // namespace content
154 157
155 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ 158 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698