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

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: 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
Index: content/worker/websharedworker_stub.cc
diff --git a/content/worker/websharedworker_stub.cc b/content/worker/websharedworker_stub.cc
index 474feb3070abf9e730f1ea5a31a701bcfa7989fa..9ff966ea3a65af00551a6f03f51811587a20e118 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,9 @@ WebSharedWorkerStub::WebSharedWorkerStub(
// is attached or explicit resume notification is received.
impl_->pauseWorkerContextOnStart();
}
+ blink::WebRuntimeFeatures::enablePreciseMemoryInfo(CommandLine::
jam 2014/04/10 14:39:45 nit: this wrapping looks odd. put CommandLine:: at
Pan 2014/04/11 01:52:13 thanks, done
+ ForCurrentProcess()->HasSwitch(switches::kEnableMemoryInfo));
+
worker_devtools_agent_.reset(new SharedWorkerDevToolsAgent(route_id, impl_));
client()->set_devtools_agent(worker_devtools_agent_.get());
impl_->startWorkerContext(url_, name,
« content/public/common/content_switches.h ('K') | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698