OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/app/content_main.h" | 5 #include "content/app/content_main.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/debugger.h" | 10 #include "base/debug/debugger.h" |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 sandbox::SandboxInterfaceInfo* sandbox_info, | 316 sandbox::SandboxInterfaceInfo* sandbox_info, |
317 ContentMainDelegate* delegate) { | 317 ContentMainDelegate* delegate) { |
318 // argc/argv are ignored on Windows; see command_line.h for details. | 318 // argc/argv are ignored on Windows; see command_line.h for details. |
319 int argc = 0; | 319 int argc = 0; |
320 char** argv = NULL; | 320 char** argv = NULL; |
321 | 321 |
322 RegisterInvalidParamHandler(); | 322 RegisterInvalidParamHandler(); |
323 _Module.Init(NULL, static_cast<HINSTANCE>(instance)); | 323 _Module.Init(NULL, static_cast<HINSTANCE>(instance)); |
324 #else | 324 #else |
325 int ContentMain(int argc, | 325 int ContentMain(int argc, |
326 char** argv, | 326 const char** argv, |
327 ContentMainDelegate* delegate) { | 327 ContentMainDelegate* delegate) { |
328 // NOTE(willchan): One might ask why this call is done here rather than in | 328 // NOTE(willchan): One might ask why this call is done here rather than in |
329 // process_util_linux.cc with the definition of | 329 // process_util_linux.cc with the definition of |
330 // EnableTerminationOnOutOfMemory(). That's because base shouldn't have a | 330 // EnableTerminationOnOutOfMemory(). That's because base shouldn't have a |
331 // dependency on TCMalloc. Really, we ought to have our allocator shim code | 331 // dependency on TCMalloc. Really, we ought to have our allocator shim code |
332 // implement this EnableTerminationOnOutOfMemory() function. Whateverz. This | 332 // implement this EnableTerminationOnOutOfMemory() function. Whateverz. This |
333 // works for now. | 333 // works for now. |
334 #if !defined(OS_MACOSX) && defined(USE_TCMALLOC) | 334 #if !defined(OS_MACOSX) && defined(USE_TCMALLOC) |
335 // For tcmalloc, we need to tell it to behave like new. | 335 // For tcmalloc, we need to tell it to behave like new. |
336 tc_set_new_mode(1); | 336 tc_set_new_mode(1); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 _CrtDumpMemoryLeaks(); | 488 _CrtDumpMemoryLeaks(); |
489 #endif // _CRTDBG_MAP_ALLOC | 489 #endif // _CRTDBG_MAP_ALLOC |
490 | 490 |
491 _Module.Term(); | 491 _Module.Term(); |
492 #endif // OS_WIN | 492 #endif // OS_WIN |
493 | 493 |
494 return exit_code; | 494 return exit_code; |
495 } | 495 } |
496 | 496 |
497 } // namespace content | 497 } // namespace content |
OLD | NEW |