Chromium Code Reviews| 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..81cee802bef26d10c51e6cd6fcd4b94dd7dadd6c 100644 |
| --- a/chrome/browser/chrome_browser_main_linux.cc |
| +++ b/chrome/browser/chrome_browser_main_linux.cc |
| @@ -30,9 +30,17 @@ |
| namespace { |
| #if defined(USE_LINUX_BREAKPAD) |
| +#if defined(OS_CHROMEOS) |
| +void ChromeOSVersionCallback(chromeos::VersionLoader::Handle, |
| + std::string version) |
|
brettw
2012/08/14 19:42:32
Can you make this a const ref? I know you didn't a
Rick Byers
2012/08/14 20:07:00
I don't think so. CancelableRequest dispatches th
brettw
2012/08/14 20:08:52
Bind should know to copy const ref args.
|
| +{ |
|
brettw
2012/08/14 19:42:32
Check { placement.
Rick Byers
2012/08/14 20:07:00
Done.
|
| + 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 +87,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(); |