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

Unified Diff: content/renderer/renderer_main.cc

Issue 380603002: Update Memory.RendererUsed only after Blink is initialized (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove observer at exit Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_main.cc
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index 242af718ce85afe6bd12ed563bdae98945c693e9..02d17e91d50d20a09f1caa5d887a6c6254dce209 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -22,7 +22,6 @@
#include "base/time/time.h"
#include "base/timer/hi_res_timer_manager.h"
#include "content/child/child_process.h"
-#include "content/child/content_child_helpers.h"
#include "content/common/content_constants_internal.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
@@ -95,22 +94,6 @@ class RendererMessageLoopObserver : public base::MessageLoop::TaskObserver {
DISALLOW_COPY_AND_ASSIGN(RendererMessageLoopObserver);
};
-// For measuring memory usage after each task. Behind a command line flag.
-class MemoryObserver : public base::MessageLoop::TaskObserver {
- public:
- MemoryObserver() {}
- virtual ~MemoryObserver() {}
-
- virtual void WillProcessTask(const base::PendingTask& pending_task) OVERRIDE {
- }
-
- virtual void DidProcessTask(const base::PendingTask& pending_task) OVERRIDE {
- HISTOGRAM_MEMORY_KB("Memory.RendererUsed", GetMemoryUsageKB());
- }
- private:
- DISALLOW_COPY_AND_ASSIGN(MemoryObserver);
-};
-
} // namespace
// mainline routine for running as the Renderer process
@@ -170,12 +153,6 @@ int RendererMain(const MainFunctionParams& parameters) {
#endif
main_message_loop.AddTaskObserver(&task_observer);
- scoped_ptr<MemoryObserver> memory_observer;
- if (parsed_command_line.HasSwitch(switches::kMemoryMetrics)) {
- memory_observer.reset(new MemoryObserver());
- main_message_loop.AddTaskObserver(memory_observer.get());
- }
-
base::PlatformThread::SetName("CrRendererMain");
bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox);
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698