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

Side by Side Diff: content/public/test/test_launcher.cc

Issue 202863004: Fix "unreachable code" warnings (MSVC warning 4702) in content/. (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 unified diff | Download patch | Annotate | Revision Log
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/test/test_launcher.h" 5 #include "content/public/test/test_launcher.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 const char kSingleProcessTestsFlag[] = "single_process"; 424 const char kSingleProcessTestsFlag[] = "single_process";
425 425
426 426
427 TestLauncherDelegate::~TestLauncherDelegate() { 427 TestLauncherDelegate::~TestLauncherDelegate() {
428 } 428 }
429 429
430 #if defined(OS_WIN) || defined(OS_LINUX) 430 #if defined(OS_WIN) || defined(OS_LINUX)
431 bool ShouldRunContentMain() { 431 bool ShouldRunContentMain() {
432 CommandLine* command_line = CommandLine::ForCurrentProcess(); 432 CommandLine* command_line = CommandLine::ForCurrentProcess();
433 return command_line->HasSwitch(switches::kProcessType) || 433 return command_line->HasSwitch(switches::kProcessType) ||
434 command_line->HasSwitch(kLaunchAsBrowser); 434 command_line->HasSwitch(kLaunchAsBrowser);
435 return false;
436 } 435 }
437 436
438 int RunContentMain(int argc, char** argv, 437 int RunContentMain(int argc, char** argv,
439 TestLauncherDelegate* launcher_delegate) { 438 TestLauncherDelegate* launcher_delegate) {
440 scoped_ptr<ContentMainDelegate> chrome_main_delegate( 439 scoped_ptr<ContentMainDelegate> chrome_main_delegate(
441 launcher_delegate->CreateContentMainDelegate()); 440 launcher_delegate->CreateContentMainDelegate());
442 ContentMainParams params(chrome_main_delegate.get()); 441 ContentMainParams params(chrome_main_delegate.get());
443 442
444 #if defined(OS_WIN) 443 #if defined(OS_WIN)
445 sandbox::SandboxInterfaceInfo sandbox_info = {0}; 444 sandbox::SandboxInterfaceInfo sandbox_info = {0};
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 base::TestLauncher launcher(&delegate, default_jobs); 511 base::TestLauncher launcher(&delegate, default_jobs);
513 bool success = launcher.Run(argc, argv); 512 bool success = launcher.Run(argc, argv);
514 return (success ? 0 : 1); 513 return (success ? 0 : 1);
515 } 514 }
516 515
517 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { 516 TestLauncherDelegate* GetCurrentTestLauncherDelegate() {
518 return g_launcher_delegate; 517 return g_launcher_delegate;
519 } 518 }
520 519
521 } // namespace content 520 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698