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

Side by Side Diff: content/app/content_main_runner.cc

Issue 2658723007: Hook up allocator shim on mac. (Closed)
Patch Set: Rebase. Created 3 years, 10 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
« chrome/app/framework.order ('K') | « chrome/app/framework.order ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <utility> 13 #include <utility>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/allocator/allocator_check.h" 16 #include "base/allocator/allocator_check.h"
17 #include "base/allocator/allocator_extension.h" 17 #include "base/allocator/allocator_extension.h"
18 #include "base/allocator/features.h"
18 #include "base/at_exit.h" 19 #include "base/at_exit.h"
19 #include "base/base_switches.h" 20 #include "base/base_switches.h"
20 #include "base/command_line.h" 21 #include "base/command_line.h"
21 #include "base/debug/debugger.h" 22 #include "base/debug/debugger.h"
22 #include "base/debug/stack_trace.h" 23 #include "base/debug/stack_trace.h"
23 #include "base/feature_list.h" 24 #include "base/feature_list.h"
24 #include "base/files/file_path.h" 25 #include "base/files/file_path.h"
25 #include "base/i18n/icu_util.h" 26 #include "base/i18n/icu_util.h"
26 #include "base/lazy_instance.h" 27 #include "base/lazy_instance.h"
27 #include "base/logging.h" 28 #include "base/logging.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #if defined(OS_WIN) 81 #if defined(OS_WIN)
81 #include <malloc.h> 82 #include <malloc.h>
82 #include <cstring> 83 #include <cstring>
83 84
84 #include "base/trace_event/trace_event_etw_export_win.h" 85 #include "base/trace_event/trace_event_etw_export_win.h"
85 #include "base/win/process_startup_helper.h" 86 #include "base/win/process_startup_helper.h"
86 #include "sandbox/win/src/sandbox_types.h" 87 #include "sandbox/win/src/sandbox_types.h"
87 #include "ui/base/win/atl_module.h" 88 #include "ui/base/win/atl_module.h"
88 #include "ui/display/win/dpi.h" 89 #include "ui/display/win/dpi.h"
89 #elif defined(OS_MACOSX) 90 #elif defined(OS_MACOSX)
91 #include "base/allocator/allocator_shim.h"
90 #include "base/mac/scoped_nsautorelease_pool.h" 92 #include "base/mac/scoped_nsautorelease_pool.h"
91 #include "base/power_monitor/power_monitor_device_source.h" 93 #include "base/power_monitor/power_monitor_device_source.h"
92 #include "content/app/mac/mac_init.h" 94 #include "content/app/mac/mac_init.h"
93 #include "content/browser/mach_broker_mac.h" 95 #include "content/browser/mach_broker_mac.h"
94 #include "content/common/sandbox_init_mac.h" 96 #include "content/common/sandbox_init_mac.h"
95 #endif // OS_WIN 97 #endif // OS_WIN
96 98
97 #if defined(OS_POSIX) 99 #if defined(OS_POSIX)
98 #include <signal.h> 100 #include <signal.h>
99 101
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 Shutdown(); 467 Shutdown();
466 } 468 }
467 469
468 int Initialize(const ContentMainParams& params) override { 470 int Initialize(const ContentMainParams& params) override {
469 ui_task_ = params.ui_task; 471 ui_task_ = params.ui_task;
470 472
471 #if defined(USE_AURA) 473 #if defined(USE_AURA)
472 env_mode_ = params.env_mode; 474 env_mode_ = params.env_mode;
473 #endif 475 #endif
474 476
477 #if defined(OS_MACOSX) && BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM)
Primiano Tucci (use gerrit) 2017/01/28 05:10:03 I would probably leave this for later, once we hav
erikchen 2017/01/31 02:21:22 shrug, okay, done.
478 base::allocator::InitializeAllocatorShim();
479 #endif
475 base::EnableTerminationOnOutOfMemory(); 480 base::EnableTerminationOnOutOfMemory();
476 #if defined(OS_WIN) 481 #if defined(OS_WIN)
477 base::win::RegisterInvalidParamHandler(); 482 base::win::RegisterInvalidParamHandler();
478 ui::win::CreateATLModuleIfNeeded(); 483 ui::win::CreateATLModuleIfNeeded();
479 484
480 sandbox_info_ = *params.sandbox_info; 485 sandbox_info_ = *params.sandbox_info;
481 #else // !OS_WIN 486 #else // !OS_WIN
482 487
483 #if defined(OS_ANDROID) 488 #if defined(OS_ANDROID)
484 // See note at the initialization of ExitManager, below; basically, 489 // See note at the initialization of ExitManager, below; basically,
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 875
871 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 876 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
872 }; 877 };
873 878
874 // static 879 // static
875 ContentMainRunner* ContentMainRunner::Create() { 880 ContentMainRunner* ContentMainRunner::Create() {
876 return new ContentMainRunnerImpl(); 881 return new ContentMainRunnerImpl();
877 } 882 }
878 883
879 } // namespace content 884 } // namespace content
OLDNEW
« chrome/app/framework.order ('K') | « chrome/app/framework.order ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698