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

Unified Diff: chrome/browser/enumerate_modules_model_win.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
Index: chrome/browser/enumerate_modules_model_win.cc
diff --git a/chrome/browser/enumerate_modules_model_win.cc b/chrome/browser/enumerate_modules_model_win.cc
index 95b24d40020987522eaa909a912d82bfe5bd650f..699c003eb500dd420c29348e547b170a5cbc03d7 100644
--- a/chrome/browser/enumerate_modules_model_win.cc
+++ b/chrome/browser/enumerate_modules_model_win.cc
@@ -341,20 +341,17 @@ ModuleEnumerator::ModuleStatus ModuleEnumerator::Match(
location_hash == blacklisted.location)) {
// We have a name match against the blacklist (and possibly location match
// also), so check version.
- scoped_ptr<Version> module_version(
- Version::GetVersionFromString(UTF16ToASCII(module.version)));
- scoped_ptr<Version> version_min(
- Version::GetVersionFromString(blacklisted.version_from));
- scoped_ptr<Version> version_max(
- Version::GetVersionFromString(blacklisted.version_to));
- bool version_ok = !version_min.get() && !version_max.get();
+ Version module_version(UTF16ToASCII(module.version));
+ Version version_min(blacklisted.version_from);
+ Version version_max(blacklisted.version_to);
+ bool version_ok = !version_min.IsValid() && !version_max.IsValid();
if (!version_ok) {
- bool too_low = version_min.get() &&
- (!module_version.get() ||
- module_version->CompareTo(*version_min.get()) < 0);
- bool too_high = version_max.get() &&
- (!module_version.get() ||
- module_version->CompareTo(*version_max.get()) >= 0);
+ bool too_low = version_min.IsValid() &&
+ (!module_version.IsValid() ||
+ module_version.CompareTo(version_min) < 0);
+ bool too_high = version_max.IsValid() &&
+ (!module_version.IsValid() ||
+ module_version.CompareTo(version_max) >= 0);
version_ok = !too_low && !too_high;
}
« no previous file with comments | « chrome/browser/chrome_browser_main_win.cc ('k') | chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698