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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 } | 59 } |
60 | 60 |
61 void WorkerFetchContextImpl::SetDataSaverEnabled(bool enabled) { | 61 void WorkerFetchContextImpl::SetDataSaverEnabled(bool enabled) { |
62 is_data_saver_enabled_ = enabled; | 62 is_data_saver_enabled_ = enabled; |
63 } | 63 } |
64 | 64 |
65 bool WorkerFetchContextImpl::IsDataSaverEnabled() const { | 65 bool WorkerFetchContextImpl::IsDataSaverEnabled() const { |
66 return is_data_saver_enabled_; | 66 return is_data_saver_enabled_; |
67 } | 67 } |
68 | 68 |
| 69 blink::WebURL WorkerFetchContextImpl::FirstPartyForCookies() const { |
| 70 return first_party_for_cookies_; |
| 71 } |
| 72 |
69 void WorkerFetchContextImpl::set_service_worker_provider_id(int id) { | 73 void WorkerFetchContextImpl::set_service_worker_provider_id(int id) { |
70 service_worker_provider_id_ = id; | 74 service_worker_provider_id_ = id; |
71 } | 75 } |
72 | 76 |
73 void WorkerFetchContextImpl::set_is_controlled_by_service_worker(bool flag) { | 77 void WorkerFetchContextImpl::set_is_controlled_by_service_worker(bool flag) { |
74 is_controlled_by_service_worker_ = flag; | 78 is_controlled_by_service_worker_ = flag; |
75 } | 79 } |
76 | 80 |
| 81 void WorkerFetchContextImpl::set_first_party_for_cookies( |
| 82 const blink::WebURL& first_party_for_cookies) { |
| 83 first_party_for_cookies_ = first_party_for_cookies; |
| 84 } |
| 85 |
77 void WorkerFetchContextImpl::SetControllerServiceWorker( | 86 void WorkerFetchContextImpl::SetControllerServiceWorker( |
78 int64_t controller_version_id) { | 87 int64_t controller_version_id) { |
79 controller_version_id_ = controller_version_id; | 88 controller_version_id_ = controller_version_id; |
80 } | 89 } |
81 | 90 |
82 } // namespace content | 91 } // namespace content |
OLD | NEW |