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

Unified Diff: chrome/app/chrome_main_delegate.cc

Issue 314253003: Remove memory_watcher tool as well as --memory-profile command line flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile issue on non-ChromeOS platforms Created 6 years, 6 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 | « build/all.gyp ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main_delegate.cc
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index 79d858c8d1fcd0a16ccd69cdf7f6e093a5c34fb2..6dbb03a3d96e93547c4e2078230c2b6798951b6c 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -47,7 +47,6 @@
#include "base/strings/string_util.h"
#include "chrome/common/child_process_logging.h"
#include "sandbox/win/src/sandbox.h"
-#include "tools/memory_watcher/memory_watcher.h"
#include "ui/base/resource/resource_bundle_win.h"
#endif
@@ -134,15 +133,6 @@ extern int ServiceProcessMain(const content::MainFunctionParams&);
namespace {
#if defined(OS_WIN)
-const wchar_t kProfilingDll[] = L"memory_watcher.dll";
-
-// Load the memory profiling DLL. All it needs to be activated
-// is to be loaded. Return true on success, false otherwise.
-bool LoadMemoryProfiler() {
- HMODULE prof_module = LoadLibrary(kProfilingDll);
- return prof_module != NULL;
-}
-
// Early versions of Chrome incorrectly registered a chromehtml: URL handler,
// which gives us nothing but trouble. Avoid launching chrome this way since
// some apps fail to properly escape arguments.
@@ -225,16 +215,6 @@ static void AdjustLinuxOOMScore(const std::string& process_type) {
}
#endif // defined(OS_LINUX)
-// Enable the heap profiler if the appropriate command-line switch is
-// present, bailing out of the app we can't.
-void EnableHeapProfiler(const CommandLine& command_line) {
-#if defined(OS_WIN)
- if (command_line.HasSwitch(switches::kMemoryProfiling))
- if (!LoadMemoryProfiler())
- exit(-1);
-#endif
-}
-
// Returns true if this subprocess type needs the ResourceBundle initialized
// and resources loaded.
bool SubprocessNeedsResourceBundle(const std::string& process_type) {
@@ -672,9 +652,6 @@ void ChromeMainDelegate::PreSandboxStartup() {
startup_timer_.reset(new base::StatsScope<base::StatsCounterTimer>
(*stats_counter_timer_));
- // Enable the heap profiler as early as possible!
- EnableHeapProfiler(command_line);
-
// Enable Message Loop related state asap.
if (command_line.HasSwitch(switches::kMessageLoopHistogrammer))
base::MessageLoop::EnableHistogrammer(true);
« no previous file with comments | « build/all.gyp ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698