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/service_worker_fetch_context_impl.h" | 5 #include "content/renderer/service_worker/service_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 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 extra_data->set_service_worker_provider_id(service_worker_provider_id_); | 39 extra_data->set_service_worker_provider_id(service_worker_provider_id_); |
40 extra_data->set_originated_from_service_worker(true); | 40 extra_data->set_originated_from_service_worker(true); |
41 extra_data->set_initiated_in_secure_context(true); | 41 extra_data->set_initiated_in_secure_context(true); |
42 request.SetExtraData(extra_data); | 42 request.SetExtraData(extra_data); |
43 } | 43 } |
44 | 44 |
45 bool ServiceWorkerFetchContextImpl::IsControlledByServiceWorker() const { | 45 bool ServiceWorkerFetchContextImpl::IsControlledByServiceWorker() const { |
46 return false; | 46 return false; |
47 } | 47 } |
48 | 48 |
49 void ServiceWorkerFetchContextImpl::SetDataSaverEnabled(bool enabled) { | 49 void ServiceWorkerFetchContextImpl::SetDataSaverFlag( |
50 is_data_saver_enabled_ = enabled; | 50 blink::WebDataSaverFlag flag) { |
| 51 data_saver_flag_ = flag; |
51 } | 52 } |
52 | 53 |
53 bool ServiceWorkerFetchContextImpl::IsDataSaverEnabled() const { | 54 blink::WebDataSaverFlag ServiceWorkerFetchContextImpl::DataSaverFlag() const { |
54 return is_data_saver_enabled_; | 55 return data_saver_flag_; |
55 } | 56 } |
56 | 57 |
57 } // namespace content | 58 } // namespace content |
OLD | NEW |