OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/service_worker/worker_fetch_context_impl.h" | 5 #include "content/renderer/service_worker/worker_fetch_context_impl.h" |
6 | 6 |
7 #include "content/child/request_extra_data.h" | 7 #include "content/child/request_extra_data.h" |
8 #include "content/child/resource_dispatcher.h" | 8 #include "content/child/resource_dispatcher.h" |
9 #include "content/child/web_url_loader_impl.h" | 9 #include "content/child/web_url_loader_impl.h" |
10 #include "mojo/public/cpp/bindings/associated_binding.h" | 10 #include "mojo/public/cpp/bindings/associated_binding.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 } | 60 } |
61 | 61 |
62 void WorkerFetchContextImpl::SetDataSaverEnabled(bool enabled) { | 62 void WorkerFetchContextImpl::SetDataSaverEnabled(bool enabled) { |
63 is_data_saver_enabled_ = enabled; | 63 is_data_saver_enabled_ = enabled; |
64 } | 64 } |
65 | 65 |
66 bool WorkerFetchContextImpl::IsDataSaverEnabled() const { | 66 bool WorkerFetchContextImpl::IsDataSaverEnabled() const { |
67 return is_data_saver_enabled_; | 67 return is_data_saver_enabled_; |
68 } | 68 } |
69 | 69 |
| 70 blink::WebURL WorkerFetchContextImpl::FirstPartyForCookies() const { |
| 71 return first_party_for_cookies_; |
| 72 } |
| 73 |
70 void WorkerFetchContextImpl::set_service_worker_provider_id(int id) { | 74 void WorkerFetchContextImpl::set_service_worker_provider_id(int id) { |
71 service_worker_provider_id_ = id; | 75 service_worker_provider_id_ = id; |
72 } | 76 } |
73 | 77 |
74 void WorkerFetchContextImpl::set_is_controlled_by_service_worker(bool flag) { | 78 void WorkerFetchContextImpl::set_is_controlled_by_service_worker(bool flag) { |
75 is_controlled_by_service_worker_ = flag; | 79 is_controlled_by_service_worker_ = flag; |
76 } | 80 } |
77 | 81 |
78 void WorkerFetchContextImpl::set_parent_frame_id(int id) { | 82 void WorkerFetchContextImpl::set_parent_frame_id(int id) { |
79 parent_frame_id_ = id; | 83 parent_frame_id_ = id; |
80 } | 84 } |
81 | 85 |
| 86 void WorkerFetchContextImpl::set_first_party_for_cookies( |
| 87 const blink::WebURL& first_party_for_cookies) { |
| 88 first_party_for_cookies_ = first_party_for_cookies; |
| 89 } |
| 90 |
82 void WorkerFetchContextImpl::SetControllerServiceWorker( | 91 void WorkerFetchContextImpl::SetControllerServiceWorker( |
83 int64_t controller_version_id) { | 92 int64_t controller_version_id) { |
84 controller_version_id_ = controller_version_id; | 93 controller_version_id_ = controller_version_id; |
85 } | 94 } |
86 | 95 |
87 } // namespace content | 96 } // namespace content |
OLD | NEW |