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

Side by Side Diff: chrome/app/chrome_main.cc

Issue 2949703002: Add OOP memory logging allocator shim (Closed)
Patch Set: More comments Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/app/chrome_main_delegate.h" 10 #include "chrome/app/chrome_main_delegate.h"
11 #include "chrome/common/chrome_switches.h" 11 #include "chrome/common/chrome_switches.h"
12 #include "chrome/common/features.h" 12 #include "chrome/common/features.h"
13 #include "content/public/app/content_main.h" 13 #include "content/public/app/content_main.h"
14 #include "content/public/common/content_switches.h" 14 #include "content/public/common/content_switches.h"
15 #include "headless/public/headless_shell.h" 15 #include "headless/public/headless_shell.h"
16 #include "ui/gfx/switches.h" 16 #include "ui/gfx/switches.h"
17 17
18 #if BUILDFLAG(ENABLE_OOP_HEAP_PROFILING) 18 #if BUILDFLAG(ENABLE_OOP_HEAP_PROFILING)
19 #include "chrome/common/profiling/memlog_sender.h"
19 #include "chrome/profiling/profiling_main.h" 20 #include "chrome/profiling/profiling_main.h"
20 #endif 21 #endif
21 22
22 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) 23 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
23 #include "services/service_manager/runner/common/client_util.h" 24 #include "services/service_manager/runner/common/client_util.h"
24 #endif 25 #endif
25 26
26 #if defined(OS_MACOSX) 27 #if defined(OS_MACOSX)
27 #include "chrome/app/chrome_main_mac.h" 28 #include "chrome/app/chrome_main_mac.h"
28 #endif 29 #endif
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) 101 #if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
101 if (command_line->HasSwitch(switches::kHeadless)) { 102 if (command_line->HasSwitch(switches::kHeadless)) {
102 #if defined(OS_MACOSX) 103 #if defined(OS_MACOSX)
103 SetUpBundleOverrides(); 104 SetUpBundleOverrides();
104 #endif 105 #endif
105 return headless::HeadlessShellMain(params); 106 return headless::HeadlessShellMain(params);
106 } 107 }
107 #endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) 108 #endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
108 109
109 #if BUILDFLAG(ENABLE_OOP_HEAP_PROFILING) 110 #if BUILDFLAG(ENABLE_OOP_HEAP_PROFILING)
111 #if !defined(OS_WIN) || defined(CHROME_MULTIPLE_DLL_BROWSER)
112 // The profiling server is only compiled into the browser process. On Windows,
113 // it should be called only for CHROME_MULTIPLE_DLL_BROWSER.
110 if (command_line->HasSwitch(switches::kMemlog)) 114 if (command_line->HasSwitch(switches::kMemlog))
111 return profiling::ProfilingMain(*command_line); 115 return profiling::ProfilingMain(*command_line);
116 #endif
117 profiling::InitMemlogSenderIfNecessary(*command_line);
112 #endif // ENABLE_OOP_HEAP_PROFILING 118 #endif // ENABLE_OOP_HEAP_PROFILING
113 119
114 #if defined(OS_CHROMEOS) && BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) 120 #if defined(OS_CHROMEOS) && BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
115 if (service_manager::ServiceManagerIsRemote()) 121 if (service_manager::ServiceManagerIsRemote())
116 params.env_mode = aura::Env::Mode::MUS; 122 params.env_mode = aura::Env::Mode::MUS;
117 #endif // BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) 123 #endif // BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
118 124
119 int rv = content::ContentMain(params); 125 int rv = content::ContentMain(params);
120 126
121 #if defined(OS_WIN) 127 #if defined(OS_WIN)
122 base::win::SetShouldCrashOnProcessDetach(false); 128 base::win::SetShouldCrashOnProcessDetach(false);
123 #endif 129 #endif
124 130
125 return rv; 131 return rv;
126 } 132 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/profiling/BUILD.gn » ('j') | chrome/common/profiling/memlog_allocator_shim.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698