OLD | NEW |
---|---|
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 "chrome/app/chrome_main_delegate.h" | 5 #include "chrome/app/chrome_main_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/environment.h" | 8 #include "base/environment.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 #include "chrome/app/chrome_breakpad_client.h" | 69 #include "chrome/app/chrome_breakpad_client.h" |
70 #include "components/breakpad/breakpad_client.h" | 70 #include "components/breakpad/breakpad_client.h" |
71 #endif | 71 #endif |
72 | 72 |
73 #if !defined(DISABLE_NACL) && defined(OS_LINUX) | 73 #if !defined(DISABLE_NACL) && defined(OS_LINUX) |
74 #include "components/nacl/common/nacl_paths.h" | 74 #include "components/nacl/common/nacl_paths.h" |
75 #include "components/nacl/zygote/nacl_fork_delegate_linux.h" | 75 #include "components/nacl/zygote/nacl_fork_delegate_linux.h" |
76 #endif | 76 #endif |
77 | 77 |
78 #if defined(OS_CHROMEOS) | 78 #if defined(OS_CHROMEOS) |
79 #include "base/i18n/time_formatting.h" | |
79 #include "base/sys_info.h" | 80 #include "base/sys_info.h" |
80 #include "chrome/browser/chromeos/boot_times_loader.h" | 81 #include "chrome/browser/chromeos/boot_times_loader.h" |
81 #include "chromeos/chromeos_paths.h" | 82 #include "chromeos/chromeos_paths.h" |
82 #include "chromeos/chromeos_switches.h" | 83 #include "chromeos/chromeos_switches.h" |
83 #endif | 84 #endif |
84 | 85 |
85 #if defined(OS_ANDROID) | 86 #if defined(OS_ANDROID) |
86 #include "chrome/common/descriptors_android.h" | 87 #include "chrome/common/descriptors_android.h" |
87 #else | 88 #else |
88 // Diagnostics is only available on non-android platforms. | 89 // Diagnostics is only available on non-android platforms. |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
739 if (!process_type.empty() && process_type != switches::kZygoteProcess) { | 740 if (!process_type.empty() && process_type != switches::kZygoteProcess) { |
740 #if defined(OS_ANDROID) | 741 #if defined(OS_ANDROID) |
741 InitNonBrowserCrashReporterForAndroid(); | 742 InitNonBrowserCrashReporterForAndroid(); |
742 #else | 743 #else |
743 InitCrashReporter(); | 744 InitCrashReporter(); |
744 #endif | 745 #endif |
745 } | 746 } |
746 #endif | 747 #endif |
747 | 748 |
748 #if defined(OS_CHROMEOS) | 749 #if defined(OS_CHROMEOS) |
749 // Read and cache ChromeOS version from file, | 750 // Read and cache ChromeOS version, to be used from inside the sandbox. |
750 // to be used from inside the sandbox. | |
751 int32 major_version, minor_version, bugfix_version; | 751 int32 major_version, minor_version, bugfix_version; |
752 base::SysInfo::OperatingSystemVersionNumbers( | 752 base::SysInfo::OperatingSystemVersionNumbers( |
pneubeck (no reviews)
2013/09/24 07:44:51
This call assumes more about the SysInfo implement
stevenjb
2013/09/24 17:18:34
I actually don't know why this was put here and di
| |
753 &major_version, &minor_version, &bugfix_version); | 753 &major_version, &minor_version, &bugfix_version); |
754 std::string lsb_source; | |
755 base::SysInfo::GetLsbReleaseValue("lsb-source", &lsb_source); | |
756 VLOG(1) << "lsb-release source: " << lsb_source; | |
757 VLOG(1) << "lsb-release time: " | |
758 << base::TimeFormatShortDateAndTime( | |
759 base::SysInfo::GetLsbReleaseTime()); | |
Daniel Erat
2013/09/24 15:37:53
nit: indenting one space seems strange -- indent f
stevenjb
2013/09/24 17:18:34
Removed.
| |
754 #endif | 760 #endif |
755 } | 761 } |
756 | 762 |
757 void ChromeMainDelegate::SandboxInitialized(const std::string& process_type) { | 763 void ChromeMainDelegate::SandboxInitialized(const std::string& process_type) { |
758 startup_timer_->Stop(); // End of Startup Time Measurement. | 764 startup_timer_->Stop(); // End of Startup Time Measurement. |
759 | 765 |
760 // Note: If you are adding a new process type below, be sure to adjust the | 766 // Note: If you are adding a new process type below, be sure to adjust the |
761 // AdjustLinuxOOMScore function too. | 767 // AdjustLinuxOOMScore function too. |
762 #if defined(OS_LINUX) | 768 #if defined(OS_LINUX) |
763 AdjustLinuxOOMScore(process_type); | 769 AdjustLinuxOOMScore(process_type); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
881 } | 887 } |
882 | 888 |
883 content::ContentUtilityClient* | 889 content::ContentUtilityClient* |
884 ChromeMainDelegate::CreateContentUtilityClient() { | 890 ChromeMainDelegate::CreateContentUtilityClient() { |
885 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 891 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
886 return NULL; | 892 return NULL; |
887 #else | 893 #else |
888 return &g_chrome_content_utility_client.Get(); | 894 return &g_chrome_content_utility_client.Get(); |
889 #endif | 895 #endif |
890 } | 896 } |
OLD | NEW |