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

Unified Diff: content/browser/worker_host/worker_service_impl.cc

Issue 154263004: Add commandline flag for ServiceWroker in the renderer process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated kinuko's comment Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/browser/worker_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/worker_host/worker_service_impl.cc
diff --git a/content/browser/worker_host/worker_service_impl.cc b/content/browser/worker_host/worker_service_impl.cc
index f2ac3735ae789c4dca1d7338ad2d67c6510d52c0..d17f44025763e544b07c353da1e6f7b700ff1da6 100644
--- a/content/browser/worker_host/worker_service_impl.cc
+++ b/content/browser/worker_host/worker_service_impl.cc
@@ -11,6 +11,7 @@
#include "base/threading/thread.h"
#include "content/browser/devtools/worker_devtools_manager.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
+#include "content/browser/shared_worker/shared_worker_service_impl.h"
#include "content/browser/worker_host/worker_message_filter.h"
#include "content/browser/worker_host/worker_process_host.h"
#include "content/common/view_messages.h"
@@ -228,7 +229,16 @@ void WorkerPrioritySetter::Observe(int type,
}
WorkerService* WorkerService::GetInstance() {
- return WorkerServiceImpl::GetInstance();
+ if (EmbeddedSharedWorkerEnabled())
+ return SharedWorkerServiceImpl::GetInstance();
+ else
+ return WorkerServiceImpl::GetInstance();
+}
+
+bool WorkerService::EmbeddedSharedWorkerEnabled() {
+ static bool enabled = CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableEmbeddedSharedWorker);
+ return enabled;
}
WorkerServiceImpl* WorkerServiceImpl::GetInstance() {
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/browser/worker_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698