diff options
author | rbyers@chromium.org <rbyers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-15 20:54:06 +0000 |
---|---|---|
committer | rbyers@chromium.org <rbyers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-15 20:54:06 +0000 |
commit | cbf0d1d72e5df6bdf02a9e29e13b3e160a5d2739 (patch) | |
tree | 89b0292f92212eb1fd3a314b42d67d8c9c548fe6 /chrome/browser/chrome_browser_main_linux.cc | |
parent | f89f58add772d9c9037334d42d8f167123eb372e (diff) | |
download | chromium_src-cbf0d1d72e5df6bdf02a9e29e13b3e160a5d2739.zip chromium_src-cbf0d1d72e5df6bdf02a9e29e13b3e160a5d2739.tar.gz chromium_src-cbf0d1d72e5df6bdf02a9e29e13b3e160a5d2739.tar.bz2 |
Set linux distro to CHROMEOS_RELEASE_DESCRIPTION on ChromeOS
This makes ChromeOS more consistent with Linux, which uses the DISTRIB_DESCRIPTION from /etc/lsb-release here. We have a different pre-existing mechanism in the code for reading the value (since ChromeOS doesn't have the lsb_release tool), but it's conceptually the same thing.
This makes it possible to search / catagorize ChromeOS crash reports based on the build, or other information about the ChromeOS version. It also allows the matching build/symbols to be more easily found given a crash report.
There's no need for Aura customization of distro anymore - that was added when
Aura was experimental. All ChromeOS is now Aura.
BUG=142630
Review URL: https://chromiumcodereview.appspot.com/10827322
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151741 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_browser_main_linux.cc')
-rw-r--r-- | chrome/browser/chrome_browser_main_linux.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/chrome_browser_main_linux.cc b/chrome/browser/chrome_browser_main_linux.cc index 42191d4..ad21460 100644 --- a/chrome/browser/chrome_browser_main_linux.cc +++ b/chrome/browser/chrome_browser_main_linux.cc @@ -30,9 +30,16 @@ namespace { #if defined(USE_LINUX_BREAKPAD) +#if defined(OS_CHROMEOS) +void ChromeOSVersionCallback(chromeos::VersionLoader::Handle, + const std::string& version) { + base::SetLinuxDistro(std::string("CrOS ") + version); +} +#else void GetLinuxDistroCallback() { base::GetLinuxDistro(); // Initialize base::linux_distro if needed. } +#endif bool IsCrashReportingEnabled(const PrefService* local_state) { // Check whether we should initialize the crash reporter. It may be disabled @@ -79,11 +86,17 @@ ChromeBrowserMainPartsLinux::~ChromeBrowserMainPartsLinux() { void ChromeBrowserMainPartsLinux::PreProfileInit() { #if defined(USE_LINUX_BREAKPAD) +#if defined(OS_CHROMEOS) + cros_version_loader_.GetVersion(&cros_consumer_, + base::Bind(&ChromeOSVersionCallback), + chromeos::VersionLoader::VERSION_FULL); +#else // Needs to be called after we have chrome::DIR_USER_DATA and // g_browser_process. This happens in PreCreateThreads. content::BrowserThread::PostTask(content::BrowserThread::FILE, FROM_HERE, base::Bind(&GetLinuxDistroCallback)); +#endif if (IsCrashReportingEnabled(local_state())) InitCrashReporter(); |