| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // TODO(port): the ifdefs in here are a first step towards trying to determine | 5 // TODO(port): the ifdefs in here are a first step towards trying to determine |
| 6 // the correct abstraction for all the OS functionality required at this | 6 // the correct abstraction for all the OS functionality required at this |
| 7 // stage of process initialization. It should not be taken as a final | 7 // stage of process initialization. It should not be taken as a final |
| 8 // abstraction. | 8 // abstraction. |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 CHECK(signal(SIGPIPE, SIG_IGN) != SIG_ERR); | 559 CHECK(signal(SIGPIPE, SIG_IGN) != SIG_ERR); |
| 560 #endif // OS_POSIX | 560 #endif // OS_POSIX |
| 561 | 561 |
| 562 if (parsed_command_line.HasSwitch(switches::kEnableNaCl)) { | 562 if (parsed_command_line.HasSwitch(switches::kEnableNaCl)) { |
| 563 // NaCl currently requires two flags to run | 563 // NaCl currently requires two flags to run |
| 564 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); | 564 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); |
| 565 singleton_command_line->AppendSwitch(switches::kInternalNaCl); | 565 singleton_command_line->AppendSwitch(switches::kInternalNaCl); |
| 566 singleton_command_line->AppendSwitch(switches::kEnableGPUPlugin); | 566 singleton_command_line->AppendSwitch(switches::kEnableGPUPlugin); |
| 567 } | 567 } |
| 568 | 568 |
| 569 // TODO(vangelis): Remove this block once accelerated compositing is enabled | |
| 570 // on all platforms. | |
| 571 #if defined(OS_MACOSX) | |
| 572 // Accelerated compositing is currently disabled by default on the mac, as it | |
| 573 // is less stable than other platforms. We disable it by adding a disable | |
| 574 // to the command line switches. Note that the rest of the code only checks | |
| 575 // for the disable flag, never for enable. | |
| 576 if (!parsed_command_line.HasSwitch( | |
| 577 switches::kEnableAcceleratedCompositing)) { | |
| 578 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); | |
| 579 singleton_command_line->AppendSwitch( | |
| 580 switches::kDisableAcceleratedCompositing); | |
| 581 } | |
| 582 #endif | |
| 583 | |
| 584 #if defined(OS_CHROMEOS) | 569 #if defined(OS_CHROMEOS) |
| 585 if (parsed_command_line.HasSwitch(switches::kBWSI)) { | 570 if (parsed_command_line.HasSwitch(switches::kBWSI)) { |
| 586 // Disable sync and extensions if we're in "browse without sign-in" mode. | 571 // Disable sync and extensions if we're in "browse without sign-in" mode. |
| 587 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); | 572 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); |
| 588 singleton_command_line->AppendSwitch(switches::kDisableSync); | 573 singleton_command_line->AppendSwitch(switches::kDisableSync); |
| 589 singleton_command_line->AppendSwitch(switches::kDisableExtensions); | 574 singleton_command_line->AppendSwitch(switches::kDisableExtensions); |
| 590 browser_defaults::bookmarks_enabled = false; | 575 browser_defaults::bookmarks_enabled = false; |
| 591 } | 576 } |
| 592 #endif | 577 #endif |
| 593 | 578 |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 | 934 |
| 950 logging::CleanupChromeLogging(); | 935 logging::CleanupChromeLogging(); |
| 951 | 936 |
| 952 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) | 937 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) |
| 953 // TODO(mark): See the TODO(mark) above at InitCrashReporter. | 938 // TODO(mark): See the TODO(mark) above at InitCrashReporter. |
| 954 DestructCrashReporter(); | 939 DestructCrashReporter(); |
| 955 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD | 940 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD |
| 956 | 941 |
| 957 return rv; | 942 return rv; |
| 958 } | 943 } |
| OLD | NEW |