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

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

Issue 688803002: ServiceWorker: Remove unused startMode field from WebEmbeddedWorkerStartData [1/2] (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 96
97 // TODO(michaeln): delete setting this deprecated member once blink
98 // stops reading it.
99 start_data.startMode =
100 params.wait_for_debugger ?
101 blink::WebEmbeddedWorkerStartModePauseOnStart :
102 blink::WebEmbeddedWorkerStartModeDontPauseOnStart;
103
104 wrapper->worker()->startWorkerContext(start_data); 97 wrapper->worker()->startWorkerContext(start_data);
105 workers_.AddWithID(wrapper.release(), params.embedded_worker_id); 98 workers_.AddWithID(wrapper.release(), params.embedded_worker_id);
106 } 99 }
107 100
108 void EmbeddedWorkerDispatcher::OnStopWorker(int embedded_worker_id) { 101 void EmbeddedWorkerDispatcher::OnStopWorker(int embedded_worker_id) {
109 TRACE_EVENT0("ServiceWorker", "EmbeddedWorkerDispatcher::OnStopWorker"); 102 TRACE_EVENT0("ServiceWorker", "EmbeddedWorkerDispatcher::OnStopWorker");
110 WorkerWrapper* wrapper = workers_.Lookup(embedded_worker_id); 103 WorkerWrapper* wrapper = workers_.Lookup(embedded_worker_id);
111 if (!wrapper) { 104 if (!wrapper) {
112 LOG(WARNING) << "Got OnStopWorker for nonexistent worker"; 105 LOG(WARNING) << "Got OnStopWorker for nonexistent worker";
113 return; 106 return;
(...skipping 10 matching lines...) Expand all
124 "EmbeddedWorkerDispatcher::OnResumeAfterDownload"); 117 "EmbeddedWorkerDispatcher::OnResumeAfterDownload");
125 WorkerWrapper* wrapper = workers_.Lookup(embedded_worker_id); 118 WorkerWrapper* wrapper = workers_.Lookup(embedded_worker_id);
126 if (!wrapper) { 119 if (!wrapper) {
127 LOG(WARNING) << "Got OnResumeAfterDownload for nonexistent worker"; 120 LOG(WARNING) << "Got OnResumeAfterDownload for nonexistent worker";
128 return; 121 return;
129 } 122 }
130 wrapper->worker()->resumeAfterDownload(); 123 wrapper->worker()->resumeAfterDownload();
131 } 124 }
132 125
133 } // namespace content 126 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698