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

Unified Diff: chrome/browser/chrome_browser_main_linux.cc

Issue 10827322: Set linux distro to CHROMEOS_RELEASE_DESCRIPTION on ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk and switch to const-ref string params in version loader callbacks Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_browser_main_linux.h ('k') | chrome/browser/chromeos/login/version_info_updater.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main_linux.cc
diff --git a/chrome/browser/chrome_browser_main_linux.cc b/chrome/browser/chrome_browser_main_linux.cc
index 42191d49501305fad3cc4d75a49ffc6141eb41ec..ad21460613eb8cfa59f68722195ebec2d39f607c 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();
« no previous file with comments | « chrome/browser/chrome_browser_main_linux.h ('k') | chrome/browser/chromeos/login/version_info_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698