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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 1575523002: Comparison and streaming operators for base::Version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index 50064fb5e0a513bb532e02e2bb0c39ccde5a426c..b69a218e3fcb9e0481365cf8d2fad04d808ddbff 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -470,8 +470,9 @@ content::PepperPluginInfo* ChromeContentClient::FindMostRecentPlugin(
Version version_x(x->version);
Version version_y(y->version);
DCHECK(version_x.IsValid() && version_y.IsValid());
- if (version_x.Equals(version_y))
+ if (version_x == version_y) {
brettw 2016/01/08 19:31:16 There's no need to add {} here: generally we would
Rob Percival 2016/01/09 23:54:03 Done. I'm in the habit of putting braces in since
return !x->is_debug && y->is_debug;
+ }
return version_x.IsOlderThan(y->version);
brettw 2016/01/08 19:31:16 Can you update this to: return version_x < versi
Rob Percival 2016/01/09 23:54:03 Done.
});
return it != plugins.end() ? *it : nullptr;

Powered by Google App Engine
This is Rietveld 408576698