OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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/embedded_worker_instance_client_impl.h
" | 5 #include "content/renderer/service_worker/embedded_worker_instance_client_impl.h
" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 blink::WebEmbeddedWorkerStartData start_data; | 120 blink::WebEmbeddedWorkerStartData start_data; |
121 start_data.script_url = params.script_url; | 121 start_data.script_url = params.script_url; |
122 start_data.user_agent = | 122 start_data.user_agent = |
123 blink::WebString::FromUTF8(GetContentClient()->GetUserAgent()); | 123 blink::WebString::FromUTF8(GetContentClient()->GetUserAgent()); |
124 start_data.wait_for_debugger_mode = | 124 start_data.wait_for_debugger_mode = |
125 params.wait_for_debugger | 125 params.wait_for_debugger |
126 ? blink::WebEmbeddedWorkerStartData::kWaitForDebugger | 126 ? blink::WebEmbeddedWorkerStartData::kWaitForDebugger |
127 : blink::WebEmbeddedWorkerStartData::kDontWaitForDebugger; | 127 : blink::WebEmbeddedWorkerStartData::kDontWaitForDebugger; |
128 start_data.v8_cache_options = static_cast<blink::WebSettings::V8CacheOptions>( | 128 start_data.v8_cache_options = static_cast<blink::WebSettings::V8CacheOptions>( |
129 params.settings.v8_cache_options); | 129 params.settings.v8_cache_options); |
130 start_data.data_saver_enabled = params.settings.data_saver_enabled; | 130 start_data.data_saver_flag = params.settings.data_saver_flag; |
131 start_data.pause_after_download_mode = | 131 start_data.pause_after_download_mode = |
132 params.pause_after_download | 132 params.pause_after_download |
133 ? blink::WebEmbeddedWorkerStartData::kPauseAfterDownload | 133 ? blink::WebEmbeddedWorkerStartData::kPauseAfterDownload |
134 : blink::WebEmbeddedWorkerStartData::kDontPauseAfterDownload; | 134 : blink::WebEmbeddedWorkerStartData::kDontPauseAfterDownload; |
135 | 135 |
136 wrapper->worker()->StartWorkerContext(start_data); | 136 wrapper->worker()->StartWorkerContext(start_data); |
137 return wrapper; | 137 return wrapper; |
138 } | 138 } |
139 | 139 |
140 } // namespace content | 140 } // namespace content |
OLD | NEW |