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

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

Issue 7857019: Basic scaffolding for a "content shell", i.e. test browser over the content module. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « content/app/content_main.h ('k') | content/app/content_main_delegate.h » ('j') | 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) 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
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
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
OLDNEW
« no previous file with comments | « content/app/content_main.h ('k') | content/app/content_main_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698