| 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/browser/upgrade_detector_impl.h" | 5 #include "chrome/browser/upgrade_detector_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/build_time.h" | 10 #include "base/build_time.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 // thing to do. | 231 // thing to do. |
| 232 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 232 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| 233 InstallUtil::GetChromeVersion(dist, system_install, &installed_version); | 233 InstallUtil::GetChromeVersion(dist, system_install, &installed_version); |
| 234 | 234 |
| 235 if (installed_version.IsValid()) { | 235 if (installed_version.IsValid()) { |
| 236 InstallUtil::GetCriticalUpdateVersion(dist, system_install, | 236 InstallUtil::GetCriticalUpdateVersion(dist, system_install, |
| 237 &critical_update); | 237 &critical_update); |
| 238 } | 238 } |
| 239 #elif defined(OS_MACOSX) | 239 #elif defined(OS_MACOSX) |
| 240 installed_version = | 240 installed_version = |
| 241 Version(UTF16ToASCII(keystone_glue::CurrentlyInstalledVersion())); | 241 Version(base::UTF16ToASCII(keystone_glue::CurrentlyInstalledVersion())); |
| 242 #elif defined(OS_POSIX) | 242 #elif defined(OS_POSIX) |
| 243 // POSIX but not Mac OS X: Linux, etc. | 243 // POSIX but not Mac OS X: Linux, etc. |
| 244 CommandLine command_line(*CommandLine::ForCurrentProcess()); | 244 CommandLine command_line(*CommandLine::ForCurrentProcess()); |
| 245 command_line.AppendSwitch(switches::kProductVersion); | 245 command_line.AppendSwitch(switches::kProductVersion); |
| 246 std::string reply; | 246 std::string reply; |
| 247 if (!base::GetAppOutput(command_line, &reply)) { | 247 if (!base::GetAppOutput(command_line, &reply)) { |
| 248 DLOG(ERROR) << "Failed to get current file version"; | 248 DLOG(ERROR) << "Failed to get current file version"; |
| 249 return; | 249 return; |
| 250 } | 250 } |
| 251 | 251 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 | 423 |
| 424 // static | 424 // static |
| 425 UpgradeDetectorImpl* UpgradeDetectorImpl::GetInstance() { | 425 UpgradeDetectorImpl* UpgradeDetectorImpl::GetInstance() { |
| 426 return Singleton<UpgradeDetectorImpl>::get(); | 426 return Singleton<UpgradeDetectorImpl>::get(); |
| 427 } | 427 } |
| 428 | 428 |
| 429 // static | 429 // static |
| 430 UpgradeDetector* UpgradeDetector::GetInstance() { | 430 UpgradeDetector* UpgradeDetector::GetInstance() { |
| 431 return UpgradeDetectorImpl::GetInstance(); | 431 return UpgradeDetectorImpl::GetInstance(); |
| 432 } | 432 } |
| OLD | NEW |