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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2891453005: Pipe the FirstPartyForCookies to WorkerFetchContext for off-main-thread-fetch (Closed)
Patch Set: rebase Created 3 years, 7 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
« no previous file with comments | « no previous file | content/renderer/service_worker/service_worker_context_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 3017 matching lines...) Expand 10 before | Expand all | Expand 10 after
3028 DCHECK(base::FeatureList::IsEnabled(features::kOffMainThreadFetch)); 3028 DCHECK(base::FeatureList::IsEnabled(features::kOffMainThreadFetch));
3029 mojom::WorkerURLLoaderFactoryProviderPtr worker_url_loader_factory_provider; 3029 mojom::WorkerURLLoaderFactoryProviderPtr worker_url_loader_factory_provider;
3030 RenderThreadImpl::current() 3030 RenderThreadImpl::current()
3031 ->blink_platform_impl() 3031 ->blink_platform_impl()
3032 ->GetInterfaceProvider() 3032 ->GetInterfaceProvider()
3033 ->GetInterface(mojo::MakeRequest(&worker_url_loader_factory_provider)); 3033 ->GetInterface(mojo::MakeRequest(&worker_url_loader_factory_provider));
3034 std::unique_ptr<WorkerFetchContextImpl> worker_fetch_context = 3034 std::unique_ptr<WorkerFetchContextImpl> worker_fetch_context =
3035 base::MakeUnique<WorkerFetchContextImpl>( 3035 base::MakeUnique<WorkerFetchContextImpl>(
3036 worker_url_loader_factory_provider.PassInterface()); 3036 worker_url_loader_factory_provider.PassInterface());
3037 worker_fetch_context->set_parent_frame_id(routing_id_); 3037 worker_fetch_context->set_parent_frame_id(routing_id_);
3038 worker_fetch_context->set_first_party_for_cookies(
3039 frame_->GetDocument().FirstPartyForCookies());
3038 blink::WebServiceWorkerNetworkProvider* web_provider = 3040 blink::WebServiceWorkerNetworkProvider* web_provider =
3039 frame_->DataSource()->GetServiceWorkerNetworkProvider(); 3041 frame_->DataSource()->GetServiceWorkerNetworkProvider();
3040 if (web_provider) { 3042 if (web_provider) {
3041 ServiceWorkerNetworkProvider* provider = 3043 ServiceWorkerNetworkProvider* provider =
3042 ServiceWorkerNetworkProvider::FromWebServiceWorkerNetworkProvider( 3044 ServiceWorkerNetworkProvider::FromWebServiceWorkerNetworkProvider(
3043 web_provider); 3045 web_provider);
3044 worker_fetch_context->set_service_worker_provider_id( 3046 worker_fetch_context->set_service_worker_provider_id(
3045 provider->provider_id()); 3047 provider->provider_id());
3046 worker_fetch_context->set_is_controlled_by_service_worker( 3048 worker_fetch_context->set_is_controlled_by_service_worker(
3047 provider->IsControlledByServiceWorker()); 3049 provider->IsControlledByServiceWorker());
(...skipping 4008 matching lines...) Expand 10 before | Expand all | Expand 10 after
7056 policy(info.default_policy), 7058 policy(info.default_policy),
7057 replaces_current_history_item(info.replaces_current_history_item), 7059 replaces_current_history_item(info.replaces_current_history_item),
7058 history_navigation_in_new_child_frame( 7060 history_navigation_in_new_child_frame(
7059 info.is_history_navigation_in_new_child_frame), 7061 info.is_history_navigation_in_new_child_frame),
7060 client_redirect(info.is_client_redirect), 7062 client_redirect(info.is_client_redirect),
7061 cache_disabled(info.is_cache_disabled), 7063 cache_disabled(info.is_cache_disabled),
7062 form(info.form), 7064 form(info.form),
7063 source_location(info.source_location) {} 7065 source_location(info.source_location) {}
7064 7066
7065 } // namespace content 7067 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/service_worker/service_worker_context_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698