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

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

Issue 190853004: Convert ContentMain to take a struct instead of parameters that vary depending on the platform. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 9 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/android/content_main.cc ('k') | content/app/content_main_runner.cc » ('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) 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.h" 5 #include "content/public/app/content_main.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "content/public/app/content_main_runner.h" 8 #include "content/public/app/content_main_runner.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 #if defined(OS_WIN) 12 int ContentMain(const ContentMainParams& params) {
13 int ContentMain(HINSTANCE instance,
14 sandbox::SandboxInterfaceInfo* sandbox_info,
15 ContentMainDelegate* delegate) {
16 #else
17 int ContentMain(int argc,
18 const char** argv,
19 ContentMainDelegate* delegate) {
20 #endif // OS_WIN
21
22 scoped_ptr<ContentMainRunner> main_runner(ContentMainRunner::Create()); 13 scoped_ptr<ContentMainRunner> main_runner(ContentMainRunner::Create());
23 14
24 int exit_code; 15 int exit_code = main_runner->Initialize(params);
25
26 #if defined(OS_WIN)
27 exit_code = main_runner->Initialize(instance, sandbox_info, delegate);
28 #else
29 exit_code = main_runner->Initialize(argc, argv, delegate);
30 #endif // OS_WIN
31
32 if (exit_code >= 0) 16 if (exit_code >= 0)
33 return exit_code; 17 return exit_code;
34 18
35 exit_code = main_runner->Run(); 19 exit_code = main_runner->Run();
36 20
37 main_runner->Shutdown(); 21 main_runner->Shutdown();
38 22
39 return exit_code; 23 return exit_code;
40 } 24 }
41 25
42 } // namespace content 26 } // namespace content
OLDNEW
« no previous file with comments | « content/app/android/content_main.cc ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698