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

Side by Side Diff: content/renderer/service_worker/embedded_worker_dispatcher.cc

Issue 918093002: Pipe v8CacheOptions for ServiceWorker from the browser process to blink [2/2 chromium] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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/service_worker/embedded_worker_dispatcher.h" 5 #include "content/renderer/service_worker/embedded_worker_dispatcher.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/child/child_process.h" 10 #include "content/child/child_process.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 start_data.scriptURL = params.script_url; 86 start_data.scriptURL = params.script_url;
87 start_data.userAgent = base::UTF8ToUTF16(GetContentClient()->GetUserAgent()); 87 start_data.userAgent = base::UTF8ToUTF16(GetContentClient()->GetUserAgent());
88 start_data.pauseAfterDownloadMode = 88 start_data.pauseAfterDownloadMode =
89 params.pause_after_download ? 89 params.pause_after_download ?
90 blink::WebEmbeddedWorkerStartData::PauseAfterDownload : 90 blink::WebEmbeddedWorkerStartData::PauseAfterDownload :
91 blink::WebEmbeddedWorkerStartData::DontPauseAfterDownload; 91 blink::WebEmbeddedWorkerStartData::DontPauseAfterDownload;
92 start_data.waitForDebuggerMode = 92 start_data.waitForDebuggerMode =
93 params.wait_for_debugger ? 93 params.wait_for_debugger ?
94 blink::WebEmbeddedWorkerStartData::WaitForDebugger : 94 blink::WebEmbeddedWorkerStartData::WaitForDebugger :
95 blink::WebEmbeddedWorkerStartData::DontWaitForDebugger; 95 blink::WebEmbeddedWorkerStartData::DontWaitForDebugger;
96 start_data.v8CacheOptions =
97 static_cast<blink::WebSettings::V8CacheOptions>(params.v8_cache_options);
96 98
97 wrapper->worker()->startWorkerContext(start_data); 99 wrapper->worker()->startWorkerContext(start_data);
98 workers_.AddWithID(wrapper.release(), params.embedded_worker_id); 100 workers_.AddWithID(wrapper.release(), params.embedded_worker_id);
99 } 101 }
100 102
101 void EmbeddedWorkerDispatcher::OnStopWorker(int embedded_worker_id) { 103 void EmbeddedWorkerDispatcher::OnStopWorker(int embedded_worker_id) {
102 TRACE_EVENT0("ServiceWorker", "EmbeddedWorkerDispatcher::OnStopWorker"); 104 TRACE_EVENT0("ServiceWorker", "EmbeddedWorkerDispatcher::OnStopWorker");
103 WorkerWrapper* wrapper = workers_.Lookup(embedded_worker_id); 105 WorkerWrapper* wrapper = workers_.Lookup(embedded_worker_id);
104 if (!wrapper) { 106 if (!wrapper) {
105 LOG(WARNING) << "Got OnStopWorker for nonexistent worker"; 107 LOG(WARNING) << "Got OnStopWorker for nonexistent worker";
(...skipping 11 matching lines...) Expand all
117 "EmbeddedWorkerDispatcher::OnResumeAfterDownload"); 119 "EmbeddedWorkerDispatcher::OnResumeAfterDownload");
118 WorkerWrapper* wrapper = workers_.Lookup(embedded_worker_id); 120 WorkerWrapper* wrapper = workers_.Lookup(embedded_worker_id);
119 if (!wrapper) { 121 if (!wrapper) {
120 LOG(WARNING) << "Got OnResumeAfterDownload for nonexistent worker"; 122 LOG(WARNING) << "Got OnResumeAfterDownload for nonexistent worker";
121 return; 123 return;
122 } 124 }
123 wrapper->worker()->resumeAfterDownload(); 125 wrapper->worker()->resumeAfterDownload();
124 } 126 }
125 127
126 } // namespace content 128 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698