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

Unified Diff: content/worker/websharedworker_stub.cc

Issue 183153002: Make shared worker aware kEnableSharedWorkerMemoryInfo switch (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 6 years, 8 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/public/common/content_switches.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/worker/websharedworker_stub.cc
diff --git a/content/worker/websharedworker_stub.cc b/content/worker/websharedworker_stub.cc
index 474feb3070abf9e730f1ea5a31a701bcfa7989fa..a0474690c2ad93a35236a65d205c11215edc2a59 100644
--- a/content/worker/websharedworker_stub.cc
+++ b/content/worker/websharedworker_stub.cc
@@ -4,6 +4,7 @@
#include "content/worker/websharedworker_stub.h"
+#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "content/child/child_process.h"
#include "content/child/child_thread.h"
@@ -11,10 +12,12 @@
#include "content/child/shared_worker_devtools_agent.h"
#include "content/child/webmessageportchannel_impl.h"
#include "content/common/worker_messages.h"
+#include "content/public/common/content_switches.h"
#include "content/worker/worker_thread.h"
-#include "third_party/WebKit/public/web/WebSharedWorker.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
+#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
+#include "third_party/WebKit/public/web/WebSharedWorker.h"
namespace content {
@@ -43,6 +46,10 @@ WebSharedWorkerStub::WebSharedWorkerStub(
// is attached or explicit resume notification is received.
impl_->pauseWorkerContextOnStart();
}
+ blink::WebRuntimeFeatures::enablePreciseMemoryInfo(
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableSharedWorkerMemoryInfo));
+
worker_devtools_agent_.reset(new SharedWorkerDevToolsAgent(route_id, impl_));
client()->set_devtools_agent(worker_devtools_agent_.get());
impl_->startWorkerContext(url_, name,
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698