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

Side by Side Diff: chrome/app/chrome_main_delegate.cc

Issue 23588009: Parse /etc/lsb-release only once on ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback Created 7 years, 3 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 "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
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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 // sets this up for the browser process in a different manner. Zygotes 738 // sets this up for the browser process in a different manner. Zygotes
738 // need to call InitCrashReporter() in RunZygote(). 739 // need to call InitCrashReporter() in RunZygote().
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 #if defined(OS_CHROMEOS)
749 // Read and cache ChromeOS version from file,
750 // to be used from inside the sandbox.
751 int32 major_version, minor_version, bugfix_version;
752 base::SysInfo::OperatingSystemVersionNumbers(
753 &major_version, &minor_version, &bugfix_version);
754 #endif
755 } 748 }
756 749
757 void ChromeMainDelegate::SandboxInitialized(const std::string& process_type) { 750 void ChromeMainDelegate::SandboxInitialized(const std::string& process_type) {
758 startup_timer_->Stop(); // End of Startup Time Measurement. 751 startup_timer_->Stop(); // End of Startup Time Measurement.
759 752
760 // Note: If you are adding a new process type below, be sure to adjust the 753 // Note: If you are adding a new process type below, be sure to adjust the
761 // AdjustLinuxOOMScore function too. 754 // AdjustLinuxOOMScore function too.
762 #if defined(OS_LINUX) 755 #if defined(OS_LINUX)
763 AdjustLinuxOOMScore(process_type); 756 AdjustLinuxOOMScore(process_type);
764 #endif 757 #endif
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 } 874 }
882 875
883 content::ContentUtilityClient* 876 content::ContentUtilityClient*
884 ChromeMainDelegate::CreateContentUtilityClient() { 877 ChromeMainDelegate::CreateContentUtilityClient() {
885 #if defined(CHROME_MULTIPLE_DLL_BROWSER) 878 #if defined(CHROME_MULTIPLE_DLL_BROWSER)
886 return NULL; 879 return NULL;
887 #else 880 #else
888 return &g_chrome_content_utility_client.Get(); 881 return &g_chrome_content_utility_client.Get();
889 #endif 882 #endif
890 } 883 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698