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

Unified Diff: content/public/test/test_launcher.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: 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 side-by-side diff with in-line comments
Download patch
Index: content/public/test/test_launcher.cc
===================================================================
--- content/public/test/test_launcher.cc (revision 255697)
+++ content/public/test/test_launcher.cc (working copy)
@@ -439,22 +439,22 @@
int RunContentMain(int argc, char** argv,
TestLauncherDelegate* launcher_delegate) {
+ scoped_ptr<ContentMainDelegate> chrome_main_delegate(
+ launcher_delegate->CreateContentMainDelegate());
+ ContentMainParams params(chrome_main_delegate.get());
+
#if defined(OS_WIN)
sandbox::SandboxInterfaceInfo sandbox_info = {0};
InitializeSandboxInfo(&sandbox_info);
- scoped_ptr<ContentMainDelegate> chrome_main_delegate(
- launcher_delegate->CreateContentMainDelegate());
- return ContentMain(GetModuleHandle(NULL),
- &sandbox_info,
- chrome_main_delegate.get());
+
+ params.instance = GetModuleHandle(NULL);
+ params.sandbox_info = &sandbox_info;
#elif defined(OS_LINUX)
- scoped_ptr<ContentMainDelegate> chrome_main_delegate(
- launcher_delegate->CreateContentMainDelegate());
- return ContentMain(argc, const_cast<const char**>(argv),
- chrome_main_delegate.get());
+ params.argc = argc;
+ params.argv = const_cast<const char**>(argv);
#endif // defined(OS_WIN)
- NOTREACHED();
- return 0;
+
+ return ContentMain(&params);
}
int LaunchTests(TestLauncherDelegate* launcher_delegate,

Powered by Google App Engine
This is Rietveld 408576698