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

Unified Diff: base/version.cc

Issue 5783005: PluginList: Unit tests and bugfixes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments; rebase Created 10 years 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: base/version.cc
diff --git a/base/version.cc b/base/version.cc
index fe224eb8662ffb8ff8575c35f4e5adbd68dc9bc0..77d4171cbe7e017f0578b4e01579a5e35ebc0b27 100644
--- a/base/version.cc
+++ b/base/version.cc
@@ -32,6 +32,14 @@ Version::Version() : is_valid_(false) {}
Version::~Version() {}
+Version* Version::Clone() const {
+ DCHECK(is_valid_);
+ Version* copy = new Version();
+ copy->components_ = components_;
+ copy->is_valid_ = true;
+ return copy;
+}
+
bool Version::Equals(const Version& that) const {
DCHECK(is_valid_);
DCHECK(that.is_valid_);

Powered by Google App Engine
This is Rietveld 408576698