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 "chrome/app/chrome_main.h" | 5 #include "chrome/app/chrome_main.h" |
6 | 6 |
7 #include "app/app_paths.h" | 7 #include "app/app_paths.h" |
8 #include "app/app_switches.h" | 8 #include "app/app_switches.h" |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 if (command_line.HasSwitch(switches::kDiagnostics)) { | 557 if (command_line.HasSwitch(switches::kDiagnostics)) { |
558 return DiagnosticsMain(command_line); | 558 return DiagnosticsMain(command_line); |
559 } | 559 } |
560 | 560 |
561 #if defined(OS_WIN) | 561 #if defined(OS_WIN) |
562 // Must do this before any other usage of command line! | 562 // Must do this before any other usage of command line! |
563 if (HasDeprecatedArguments(command_line.command_line_string())) | 563 if (HasDeprecatedArguments(command_line.command_line_string())) |
564 return 1; | 564 return 1; |
565 #endif | 565 #endif |
566 | 566 |
567 if (command_line.HasSwitch(switches::kEnableNaCl)) { | |
568 // NaCl currently requires two flags to run | |
569 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); | |
570 singleton_command_line->AppendSwitch(switches::kEnableGPUPlugin); | |
571 } | |
572 | |
573 #if defined(OS_CHROMEOS) | 567 #if defined(OS_CHROMEOS) |
574 if (command_line.HasSwitch(switches::kGuestSession)) { | 568 if (command_line.HasSwitch(switches::kGuestSession)) { |
575 // Disable sync and extensions if we're in "browse without sign-in" mode. | 569 // Disable sync and extensions if we're in "browse without sign-in" mode. |
576 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); | 570 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); |
577 singleton_command_line->AppendSwitch(switches::kDisableSync); | 571 singleton_command_line->AppendSwitch(switches::kDisableSync); |
578 singleton_command_line->AppendSwitch(switches::kDisableExtensions); | 572 singleton_command_line->AppendSwitch(switches::kDisableExtensions); |
579 browser_defaults::bookmarks_enabled = false; | 573 browser_defaults::bookmarks_enabled = false; |
580 } | 574 } |
581 #endif | 575 #endif |
582 | 576 |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 | 818 |
825 int exit_code = RunNamedProcessTypeMain(process_type, main_params); | 819 int exit_code = RunNamedProcessTypeMain(process_type, main_params); |
826 | 820 |
827 if (SubprocessNeedsResourceBundle(process_type)) | 821 if (SubprocessNeedsResourceBundle(process_type)) |
828 ResourceBundle::CleanupSharedInstance(); | 822 ResourceBundle::CleanupSharedInstance(); |
829 | 823 |
830 LowLevelShutdown(); | 824 LowLevelShutdown(); |
831 | 825 |
832 return exit_code; | 826 return exit_code; |
833 } | 827 } |
OLD | NEW |