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

Unified Diff: chrome/common/service_process_util.cc

Issue 10683005: Remove two deprecated methods from base::Version (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 years, 6 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/common/extensions/update_manifest.cc ('k') | chrome/common/service_process_util_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/service_process_util.cc
diff --git a/chrome/common/service_process_util.cc b/chrome/common/service_process_util.cc
index 768c6189678074c9c7def3cd45e58fa287fdd00e..88cf136d48faa7c036a6eb356dea32aa8a5530b5 100644
--- a/chrome/common/service_process_util.cc
+++ b/chrome/common/service_process_util.cc
@@ -69,9 +69,9 @@ ServiceProcessRunningState GetServiceProcessRunningState(
if (service_version_out)
*service_version_out = version;
- scoped_ptr<Version> service_version(Version::GetVersionFromString(version));
+ Version service_version(version);
// If the version string is invalid, treat it like an older version.
- if (!service_version.get())
+ if (!service_version.IsValid())
return SERVICE_OLDER_VERSION_RUNNING;
// Get the version of the currently *running* instance of Chrome.
@@ -82,18 +82,17 @@ ServiceProcessRunningState GetServiceProcessRunningState(
// are out of date.
return SERVICE_NEWER_VERSION_RUNNING;
}
- scoped_ptr<Version> running_version(Version::GetVersionFromString(
- version_info.Version()));
- if (!running_version.get()) {
+ Version running_version(version_info.Version());
+ if (!running_version.IsValid()) {
NOTREACHED() << "Failed to parse version info";
// Our own version is invalid. This is an error case. Pretend that we
// are out of date.
return SERVICE_NEWER_VERSION_RUNNING;
}
- if (running_version->CompareTo(*service_version) > 0) {
+ if (running_version.CompareTo(service_version) > 0) {
return SERVICE_OLDER_VERSION_RUNNING;
- } else if (service_version->CompareTo(*running_version) > 0) {
+ } else if (service_version.CompareTo(running_version) > 0) {
return SERVICE_NEWER_VERSION_RUNNING;
}
return SERVICE_SAME_VERSION_RUNNING;
« no previous file with comments | « chrome/common/extensions/update_manifest.cc ('k') | chrome/common/service_process_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698