| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "base/i18n/icu_util.h" | 42 #include "base/i18n/icu_util.h" |
| 43 #include "base/message_loop.h" | 43 #include "base/message_loop.h" |
| 44 #include "base/path_service.h" | 44 #include "base/path_service.h" |
| 45 #include "base/process_util.h" | 45 #include "base/process_util.h" |
| 46 #include "base/scoped_nsautorelease_pool.h" | 46 #include "base/scoped_nsautorelease_pool.h" |
| 47 #include "base/stats_counters.h" | 47 #include "base/stats_counters.h" |
| 48 #include "base/stats_table.h" | 48 #include "base/stats_table.h" |
| 49 #include "base/string_number_conversions.h" | 49 #include "base/string_number_conversions.h" |
| 50 #include "base/string_util.h" | 50 #include "base/string_util.h" |
| 51 #include "base/utf_string_conversions.h" | 51 #include "base/utf_string_conversions.h" |
| 52 #include "chrome/browser/defaults.h" |
| 52 #include "chrome/browser/diagnostics/diagnostics_main.h" | 53 #include "chrome/browser/diagnostics/diagnostics_main.h" |
| 53 #include "chrome/browser/renderer_host/render_process_host.h" | 54 #include "chrome/browser/renderer_host/render_process_host.h" |
| 54 #include "chrome/browser/platform_util.h" | 55 #include "chrome/browser/platform_util.h" |
| 55 #include "chrome/common/chrome_constants.h" | 56 #include "chrome/common/chrome_constants.h" |
| 56 #include "chrome/common/chrome_counters.h" | 57 #include "chrome/common/chrome_counters.h" |
| 57 #include "chrome/common/chrome_descriptors.h" | 58 #include "chrome/common/chrome_descriptors.h" |
| 58 #include "chrome/common/chrome_paths.h" | 59 #include "chrome/common/chrome_paths.h" |
| 59 #include "chrome/common/chrome_switches.h" | 60 #include "chrome/common/chrome_switches.h" |
| 60 #include "chrome/common/chrome_version_info.h" | 61 #include "chrome/common/chrome_version_info.h" |
| 61 #include "chrome/common/logging_chrome.h" | 62 #include "chrome/common/logging_chrome.h" |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 singleton_command_line->AppendSwitch(switches::kInternalNaCl); | 566 singleton_command_line->AppendSwitch(switches::kInternalNaCl); |
| 566 singleton_command_line->AppendSwitch(switches::kEnableGPUPlugin); | 567 singleton_command_line->AppendSwitch(switches::kEnableGPUPlugin); |
| 567 } | 568 } |
| 568 | 569 |
| 569 #if defined(OS_CHROMEOS) | 570 #if defined(OS_CHROMEOS) |
| 570 if (parsed_command_line.HasSwitch(switches::kBWSI)) { | 571 if (parsed_command_line.HasSwitch(switches::kBWSI)) { |
| 571 // Disable sync and extensions if we're in "browse without sign-in" mode. | 572 // Disable sync and extensions if we're in "browse without sign-in" mode. |
| 572 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); | 573 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); |
| 573 singleton_command_line->AppendSwitch(switches::kDisableSync); | 574 singleton_command_line->AppendSwitch(switches::kDisableSync); |
| 574 singleton_command_line->AppendSwitch(switches::kDisableExtensions); | 575 singleton_command_line->AppendSwitch(switches::kDisableExtensions); |
| 576 browser_defaults::bookmarks_enabled = false; |
| 575 } | 577 } |
| 576 #endif | 578 #endif |
| 577 | 579 |
| 578 base::ProcessId browser_pid = base::GetCurrentProcId(); | 580 base::ProcessId browser_pid = base::GetCurrentProcId(); |
| 579 if (SubprocessIsBrowserChild(process_type)) { | 581 if (SubprocessIsBrowserChild(process_type)) { |
| 580 #if defined(OS_WIN) | 582 #if defined(OS_WIN) |
| 581 std::string channel_name = | 583 std::string channel_name = |
| 582 parsed_command_line.GetSwitchValueASCII(switches::kProcessChannelID); | 584 parsed_command_line.GetSwitchValueASCII(switches::kProcessChannelID); |
| 583 | 585 |
| 584 int browser_pid_int; | 586 int browser_pid_int; |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 | 915 |
| 914 logging::CleanupChromeLogging(); | 916 logging::CleanupChromeLogging(); |
| 915 | 917 |
| 916 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) | 918 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) |
| 917 // TODO(mark): See the TODO(mark) above at InitCrashReporter. | 919 // TODO(mark): See the TODO(mark) above at InitCrashReporter. |
| 918 DestructCrashReporter(); | 920 DestructCrashReporter(); |
| 919 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD | 921 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD |
| 920 | 922 |
| 921 return rv; | 923 return rv; |
| 922 } | 924 } |
| OLD | NEW |