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

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

Issue 1828063002: Add support for origin trials in workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trial-token-in-header-blink-document
Patch Set: address comments Created 4 years, 7 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 document->initContentSecurityPolicy(m_mainScriptLoader->releaseContentSecuri tyPolicy()); 385 document->initContentSecurityPolicy(m_mainScriptLoader->releaseContentSecuri tyPolicy());
386 386
387 KURL scriptURL = m_mainScriptLoader->url(); 387 KURL scriptURL = m_mainScriptLoader->url();
388 WorkerThreadStartMode startMode = m_workerInspectorProxy->workerStartMode(do cument); 388 WorkerThreadStartMode startMode = m_workerInspectorProxy->workerStartMode(do cument);
389 OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::creat e( 389 OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::creat e(
390 scriptURL, 390 scriptURL,
391 m_workerStartData.userAgent, 391 m_workerStartData.userAgent,
392 m_mainScriptLoader->script(), 392 m_mainScriptLoader->script(),
393 m_mainScriptLoader->releaseCachedMetadata(), 393 m_mainScriptLoader->releaseCachedMetadata(),
394 startMode, 394 startMode,
395 document->contentSecurityPolicy()->headers(), 395 document->contentSecurityPolicy()->headers().get(),
396 starterOrigin, 396 starterOrigin,
397 workerClients, 397 workerClients,
398 m_mainScriptLoader->responseAddressSpace(), 398 m_mainScriptLoader->responseAddressSpace(),
399 m_mainScriptLoader->originTrialTokens(),
399 static_cast<V8CacheOptions>(m_workerStartData.v8CacheOptions)); 400 static_cast<V8CacheOptions>(m_workerStartData.v8CacheOptions));
400 401
401 m_mainScriptLoader.clear(); 402 m_mainScriptLoader.clear();
402 403
403 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient); 404 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient);
404 m_loaderProxy = WorkerLoaderProxy::create(this); 405 m_loaderProxy = WorkerLoaderProxy::create(this);
405 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy); 406 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy);
406 m_workerThread->start(startupData.release()); 407 m_workerThread->start(startupData.release());
407 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL); 408 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL);
408 } 409 }
409 410
410 } // namespace blink 411 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698