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

Side by Side Diff: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp

Issue 2086143006: Implement Referrer-Policy header for workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix shared worker path Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp ('k') | 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 provideIndexedDBClientToWorker(workerClients, IndexedDBClientImpl::create()) ; 337 provideIndexedDBClientToWorker(workerClients, IndexedDBClientImpl::create()) ;
338 ContentSecurityPolicy* contentSecurityPolicy = m_mainScriptLoader->releaseCo ntentSecurityPolicy(); 338 ContentSecurityPolicy* contentSecurityPolicy = m_mainScriptLoader->releaseCo ntentSecurityPolicy();
339 WorkerThreadStartMode startMode = m_workerInspectorProxy->workerStartMode(do cument); 339 WorkerThreadStartMode startMode = m_workerInspectorProxy->workerStartMode(do cument);
340 std::unique_ptr<WorkerThreadStartupData> startupData = WorkerThreadStartupDa ta::create( 340 std::unique_ptr<WorkerThreadStartupData> startupData = WorkerThreadStartupDa ta::create(
341 m_url, 341 m_url,
342 m_loadingDocument->userAgent(), 342 m_loadingDocument->userAgent(),
343 m_mainScriptLoader->script(), 343 m_mainScriptLoader->script(),
344 nullptr, 344 nullptr,
345 startMode, 345 startMode,
346 contentSecurityPolicy ? contentSecurityPolicy->headers().get() : nullptr , 346 contentSecurityPolicy ? contentSecurityPolicy->headers().get() : nullptr ,
347 m_mainScriptLoader->referrerPolicy(),
347 starterOrigin, 348 starterOrigin,
348 workerClients, 349 workerClients,
349 m_mainScriptLoader->responseAddressSpace(), 350 m_mainScriptLoader->responseAddressSpace(),
350 m_mainScriptLoader->originTrialTokens()); 351 m_mainScriptLoader->originTrialTokens());
351 m_loaderProxy = WorkerLoaderProxy::create(this); 352 m_loaderProxy = WorkerLoaderProxy::create(this);
352 m_workerThread = SharedWorkerThread::create(m_name, m_loaderProxy, *this); 353 m_workerThread = SharedWorkerThread::create(m_name, m_loaderProxy, *this);
353 InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScri ptLoader->identifier(), m_mainScriptLoader->script()); 354 InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScri ptLoader->identifier(), m_mainScriptLoader->script());
354 m_mainScriptLoader.clear(); 355 m_mainScriptLoader.clear();
355 356
356 workerThread()->start(std::move(startupData)); 357 workerThread()->start(std::move(startupData));
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 if (devtoolsAgent) 399 if (devtoolsAgent)
399 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, mes sage); 400 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, mes sage);
400 } 401 }
401 402
402 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) 403 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client)
403 { 404 {
404 return new WebSharedWorkerImpl(client); 405 return new WebSharedWorkerImpl(client);
405 } 406 }
406 407
407 } // namespace blink 408 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698