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

Unified Diff: base/values.h

Issue 668783004: Standardize usage of virtual/override/final in base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted Created 6 years, 2 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 | « base/tools_sanity_unittest.cc ('k') | base/values_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/values.h
diff --git a/base/values.h b/base/values.h
index 68dd9c8b859eedc8112bfcc39975dfbcc78dc3a1..04b2d26eac603d37300453bdc50daeabd8acea59 100644
--- a/base/values.h
+++ b/base/values.h
@@ -121,16 +121,16 @@ class BASE_EXPORT FundamentalValue : public Value {
explicit FundamentalValue(bool in_value);
explicit FundamentalValue(int in_value);
explicit FundamentalValue(double in_value);
- virtual ~FundamentalValue();
+ ~FundamentalValue() override;
// Overridden from Value:
- virtual bool GetAsBoolean(bool* out_value) const override;
- virtual bool GetAsInteger(int* out_value) const override;
+ bool GetAsBoolean(bool* out_value) const override;
+ bool GetAsInteger(int* out_value) const override;
// Values of both type TYPE_INTEGER and TYPE_DOUBLE can be obtained as
// doubles.
- virtual bool GetAsDouble(double* out_value) const override;
- virtual FundamentalValue* DeepCopy() const override;
- virtual bool Equals(const Value* other) const override;
+ bool GetAsDouble(double* out_value) const override;
+ FundamentalValue* DeepCopy() const override;
+ bool Equals(const Value* other) const override;
private:
union {
@@ -148,18 +148,18 @@ class BASE_EXPORT StringValue : public Value {
// Initializes a StringValue with a string16.
explicit StringValue(const string16& in_value);
- virtual ~StringValue();
+ ~StringValue() override;
// Returns |value_| as a pointer or reference.
std::string* GetString();
const std::string& GetString() const;
// Overridden from Value:
- virtual bool GetAsString(std::string* out_value) const override;
- virtual bool GetAsString(string16* out_value) const override;
- virtual bool GetAsString(const StringValue** out_value) const override;
- virtual StringValue* DeepCopy() const override;
- virtual bool Equals(const Value* other) const override;
+ bool GetAsString(std::string* out_value) const override;
+ bool GetAsString(string16* out_value) const override;
+ bool GetAsString(const StringValue** out_value) const override;
+ StringValue* DeepCopy() const override;
+ bool Equals(const Value* other) const override;
private:
std::string value_;
@@ -174,7 +174,7 @@ class BASE_EXPORT BinaryValue: public Value {
// |buffer|.
BinaryValue(scoped_ptr<char[]> buffer, size_t size);
- virtual ~BinaryValue();
+ ~BinaryValue() override;
// For situations where you want to keep ownership of your buffer, this
// factory method creates a new BinaryValue by copying the contents of the
@@ -188,8 +188,8 @@ class BASE_EXPORT BinaryValue: public Value {
const char* GetBuffer() const { return buffer_.get(); }
// Overridden from Value:
- virtual BinaryValue* DeepCopy() const override;
- virtual bool Equals(const Value* other) const override;
+ BinaryValue* DeepCopy() const override;
+ bool Equals(const Value* other) const override;
private:
scoped_ptr<char[]> buffer_;
@@ -204,12 +204,11 @@ class BASE_EXPORT BinaryValue: public Value {
class BASE_EXPORT DictionaryValue : public Value {
public:
DictionaryValue();
- virtual ~DictionaryValue();
+ ~DictionaryValue() override;
// Overridden from Value:
- virtual bool GetAsDictionary(DictionaryValue** out_value) override;
- virtual bool GetAsDictionary(
- const DictionaryValue** out_value) const override;
+ bool GetAsDictionary(DictionaryValue** out_value) override;
+ bool GetAsDictionary(const DictionaryValue** out_value) const override;
// Returns true if the current dictionary has a value for the given key.
bool HasKey(const std::string& key) const;
@@ -362,8 +361,8 @@ class BASE_EXPORT DictionaryValue : public Value {
};
// Overridden from Value:
- virtual DictionaryValue* DeepCopy() const override;
- virtual bool Equals(const Value* other) const override;
+ DictionaryValue* DeepCopy() const override;
+ bool Equals(const Value* other) const override;
private:
ValueMap dictionary_;
@@ -378,7 +377,7 @@ class BASE_EXPORT ListValue : public Value {
typedef ValueVector::const_iterator const_iterator;
ListValue();
- virtual ~ListValue();
+ ~ListValue() override;
// Clears the contents of this ListValue
void Clear();
@@ -476,10 +475,10 @@ class BASE_EXPORT ListValue : public Value {
const_iterator end() const { return list_.end(); }
// Overridden from Value:
- virtual bool GetAsList(ListValue** out_value) override;
- virtual bool GetAsList(const ListValue** out_value) const override;
- virtual ListValue* DeepCopy() const override;
- virtual bool Equals(const Value* other) const override;
+ bool GetAsList(ListValue** out_value) override;
+ bool GetAsList(const ListValue** out_value) const override;
+ ListValue* DeepCopy() const override;
+ bool Equals(const Value* other) const override;
private:
ValueVector list_;
« no previous file with comments | « base/tools_sanity_unittest.cc ('k') | base/values_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698