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

Side by Side Diff: content/renderer/shared_worker/embedded_shared_worker_stub.cc

Issue 1568073002: Reduce string copies in GURL creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac Created 4 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/shared_worker/embedded_shared_worker_stub.h" 5 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 EmbeddedSharedWorkerStub::createApplicationCacheHost( 222 EmbeddedSharedWorkerStub::createApplicationCacheHost(
223 blink::WebApplicationCacheHostClient* client) { 223 blink::WebApplicationCacheHostClient* client) {
224 app_cache_host_ = new SharedWorkerWebApplicationCacheHostImpl(client); 224 app_cache_host_ = new SharedWorkerWebApplicationCacheHostImpl(client);
225 return app_cache_host_; 225 return app_cache_host_;
226 } 226 }
227 227
228 blink::WebWorkerContentSettingsClientProxy* 228 blink::WebWorkerContentSettingsClientProxy*
229 EmbeddedSharedWorkerStub::createWorkerContentSettingsClientProxy( 229 EmbeddedSharedWorkerStub::createWorkerContentSettingsClientProxy(
230 const blink::WebSecurityOrigin& origin) { 230 const blink::WebSecurityOrigin& origin) {
231 return new EmbeddedSharedWorkerContentSettingsClientProxy( 231 return new EmbeddedSharedWorkerContentSettingsClientProxy(
232 GURL(origin.toString()), 232 GURL(base::string16(origin.toString())),
233 origin.isUnique(), 233 origin.isUnique(),
234 route_id_, 234 route_id_,
235 ChildThreadImpl::current()->thread_safe_sender()); 235 ChildThreadImpl::current()->thread_safe_sender());
236 } 236 }
237 237
238 blink::WebServiceWorkerNetworkProvider* 238 blink::WebServiceWorkerNetworkProvider*
239 EmbeddedSharedWorkerStub::createServiceWorkerNetworkProvider( 239 EmbeddedSharedWorkerStub::createServiceWorkerNetworkProvider(
240 blink::WebDataSource* data_source) { 240 blink::WebDataSource* data_source) {
241 // Create a content::ServiceWorkerNetworkProvider for this data source so 241 // Create a content::ServiceWorkerNetworkProvider for this data source so
242 // we can observe its requests. 242 // we can observe its requests.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 } 299 }
300 } 300 }
301 301
302 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { 302 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() {
303 // After this we wouldn't get any IPC for this stub. 303 // After this we wouldn't get any IPC for this stub.
304 running_ = false; 304 running_ = false;
305 impl_->terminateWorkerContext(); 305 impl_->terminateWorkerContext();
306 } 306 }
307 307
308 } // namespace content 308 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698