summaryrefslogtreecommitdiffstats
path: root/base/json
diff options
context:
space:
mode:
authormostynb <mostynb@opera.com>2014-10-07 10:59:11 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-07 17:59:25 +0000
commit9e096de10e6fdcafde67df469ed9a6b8b156dfb1 (patch)
tree301e744a7e3e865e32a6fd0a779c115e926b7fd6 /base/json
parent35d1d3a0d525595304fc8333373ddb660bd649cc (diff)
downloadchromium_src-9e096de10e6fdcafde67df469ed9a6b8b156dfb1.zip
chromium_src-9e096de10e6fdcafde67df469ed9a6b8b156dfb1.tar.gz
chromium_src-9e096de10e6fdcafde67df469ed9a6b8b156dfb1.tar.bz2
replace OVERRIDE and FINAL with override and final in base/
BUG=417463 Review URL: https://codereview.chromium.org/611153004 Cr-Commit-Position: refs/heads/master@{#298520}
Diffstat (limited to 'base/json')
-rw-r--r--base/json/json_file_value_serializer.h4
-rw-r--r--base/json/json_parser.cc16
-rw-r--r--base/json/json_string_value_serializer.h4
-rw-r--r--base/json/json_value_converter.h24
-rw-r--r--base/json/json_value_serializer_unittest.cc2
5 files changed, 25 insertions, 25 deletions
diff --git a/base/json/json_file_value_serializer.h b/base/json/json_file_value_serializer.h
index 8006373..fc12b6b 100644
--- a/base/json/json_file_value_serializer.h
+++ b/base/json/json_file_value_serializer.h
@@ -32,7 +32,7 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer {
// Attempt to serialize the data structure represented by Value into
// JSON. If the return value is true, the result will have been written
// into the file whose name was passed into the constructor.
- virtual bool Serialize(const base::Value& root) OVERRIDE;
+ virtual bool Serialize(const base::Value& root) override;
// Equivalent to Serialize(root) except binary values are omitted from the
// output.
@@ -46,7 +46,7 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer {
// error message including the location of the error if appropriate.
// The caller takes ownership of the returned value.
virtual base::Value* Deserialize(int* error_code,
- std::string* error_message) OVERRIDE;
+ std::string* error_message) override;
// This enum is designed to safely overlap with JSONReader::JsonParseError.
enum JsonFileError {
diff --git a/base/json/json_parser.cc b/base/json/json_parser.cc
index 32e55e8..a74da5f 100644
--- a/base/json/json_parser.cc
+++ b/base/json/json_parser.cc
@@ -37,7 +37,7 @@ class DictionaryHiddenRootValue : public base::DictionaryValue {
DictionaryValue::Swap(static_cast<DictionaryValue*>(root));
}
- virtual void Swap(DictionaryValue* other) OVERRIDE {
+ virtual void Swap(DictionaryValue* other) override {
DVLOG(1) << "Swap()ing a DictionaryValue inefficiently.";
// First deep copy to convert JSONStringValue to std::string and swap that
@@ -56,7 +56,7 @@ class DictionaryHiddenRootValue : public base::DictionaryValue {
// the method below.
virtual bool RemoveWithoutPathExpansion(const std::string& key,
- scoped_ptr<Value>* out) OVERRIDE {
+ scoped_ptr<Value>* out) override {
// If the caller won't take ownership of the removed value, just call up.
if (!out)
return DictionaryValue::RemoveWithoutPathExpansion(key, out);
@@ -87,7 +87,7 @@ class ListHiddenRootValue : public base::ListValue {
ListValue::Swap(static_cast<ListValue*>(root));
}
- virtual void Swap(ListValue* other) OVERRIDE {
+ virtual void Swap(ListValue* other) override {
DVLOG(1) << "Swap()ing a ListValue inefficiently.";
// First deep copy to convert JSONStringValue to std::string and swap that
@@ -102,7 +102,7 @@ class ListHiddenRootValue : public base::ListValue {
ListValue::Swap(copy.get());
}
- virtual bool Remove(size_t index, scoped_ptr<Value>* out) OVERRIDE {
+ virtual bool Remove(size_t index, scoped_ptr<Value>* out) override {
// If the caller won't take ownership of the removed value, just call up.
if (!out)
return ListValue::Remove(index, out);
@@ -137,18 +137,18 @@ class JSONStringValue : public base::Value {
}
// Overridden from base::Value:
- virtual bool GetAsString(std::string* out_value) const OVERRIDE {
+ virtual bool GetAsString(std::string* out_value) const override {
string_piece_.CopyToString(out_value);
return true;
}
- virtual bool GetAsString(string16* out_value) const OVERRIDE {
+ virtual bool GetAsString(string16* out_value) const override {
*out_value = UTF8ToUTF16(string_piece_);
return true;
}
- virtual Value* DeepCopy() const OVERRIDE {
+ virtual Value* DeepCopy() const override {
return new StringValue(string_piece_.as_string());
}
- virtual bool Equals(const Value* other) const OVERRIDE {
+ virtual bool Equals(const Value* other) const override {
std::string other_string;
return other->IsType(TYPE_STRING) && other->GetAsString(&other_string) &&
StringPiece(other_string) == string_piece_;
diff --git a/base/json/json_string_value_serializer.h b/base/json/json_string_value_serializer.h
index 014ef9f..7fc5c6e 100644
--- a/base/json/json_string_value_serializer.h
+++ b/base/json/json_string_value_serializer.h
@@ -38,7 +38,7 @@ class BASE_EXPORT JSONStringValueSerializer : public base::ValueSerializer {
// Attempt to serialize the data structure represented by Value into
// JSON. If the return value is true, the result will have been written
// into the string passed into the constructor.
- virtual bool Serialize(const base::Value& root) OVERRIDE;
+ virtual bool Serialize(const base::Value& root) override;
// Equivalent to Serialize(root) except binary values are omitted from the
// output.
@@ -52,7 +52,7 @@ class BASE_EXPORT JSONStringValueSerializer : public base::ValueSerializer {
// error message including the location of the error if appropriate.
// The caller takes ownership of the returned value.
virtual base::Value* Deserialize(int* error_code,
- std::string* error_message) OVERRIDE;
+ std::string* error_message) override;
void set_pretty_print(bool new_value) { pretty_print_ = new_value; }
bool pretty_print() { return pretty_print_; }
diff --git a/base/json/json_value_converter.h b/base/json/json_value_converter.h
index cf3c74f..f049d9a 100644
--- a/base/json/json_value_converter.h
+++ b/base/json/json_value_converter.h
@@ -123,7 +123,7 @@ class FieldConverter : public FieldConverterBase<StructType> {
}
virtual bool ConvertField(
- const base::Value& value, StructType* dst) const OVERRIDE {
+ const base::Value& value, StructType* dst) const override {
return value_converter_->Convert(value, &(dst->*field_pointer_));
}
@@ -141,7 +141,7 @@ class BasicValueConverter<int> : public ValueConverter<int> {
public:
BasicValueConverter() {}
- virtual bool Convert(const base::Value& value, int* field) const OVERRIDE {
+ virtual bool Convert(const base::Value& value, int* field) const override {
return value.GetAsInteger(field);
}
@@ -155,7 +155,7 @@ class BasicValueConverter<std::string> : public ValueConverter<std::string> {
BasicValueConverter() {}
virtual bool Convert(
- const base::Value& value, std::string* field) const OVERRIDE {
+ const base::Value& value, std::string* field) const override {
return value.GetAsString(field);
}
@@ -169,7 +169,7 @@ class BasicValueConverter<string16> : public ValueConverter<string16> {
BasicValueConverter() {}
virtual bool Convert(
- const base::Value& value, string16* field) const OVERRIDE {
+ const base::Value& value, string16* field) const override {
return value.GetAsString(field);
}
@@ -182,7 +182,7 @@ class BasicValueConverter<double> : public ValueConverter<double> {
public:
BasicValueConverter() {}
- virtual bool Convert(const base::Value& value, double* field) const OVERRIDE {
+ virtual bool Convert(const base::Value& value, double* field) const override {
return value.GetAsDouble(field);
}
@@ -195,7 +195,7 @@ class BasicValueConverter<bool> : public ValueConverter<bool> {
public:
BasicValueConverter() {}
- virtual bool Convert(const base::Value& value, bool* field) const OVERRIDE {
+ virtual bool Convert(const base::Value& value, bool* field) const override {
return value.GetAsBoolean(field);
}
@@ -212,7 +212,7 @@ class ValueFieldConverter : public ValueConverter<FieldType> {
: convert_func_(convert_func) {}
virtual bool Convert(const base::Value& value,
- FieldType* field) const OVERRIDE {
+ FieldType* field) const override {
return convert_func_(&value, field);
}
@@ -231,7 +231,7 @@ class CustomFieldConverter : public ValueConverter<FieldType> {
: convert_func_(convert_func) {}
virtual bool Convert(const base::Value& value,
- FieldType* field) const OVERRIDE {
+ FieldType* field) const override {
std::string string_value;
return value.GetAsString(&string_value) &&
convert_func_(string_value, field);
@@ -249,7 +249,7 @@ class NestedValueConverter : public ValueConverter<NestedType> {
NestedValueConverter() {}
virtual bool Convert(
- const base::Value& value, NestedType* field) const OVERRIDE {
+ const base::Value& value, NestedType* field) const override {
return converter_.Convert(value, field);
}
@@ -264,7 +264,7 @@ class RepeatedValueConverter : public ValueConverter<ScopedVector<Element> > {
RepeatedValueConverter() {}
virtual bool Convert(
- const base::Value& value, ScopedVector<Element>* field) const OVERRIDE {
+ const base::Value& value, ScopedVector<Element>* field) const override {
const base::ListValue* list = NULL;
if (!value.GetAsList(&list)) {
// The field is not a list.
@@ -300,7 +300,7 @@ class RepeatedMessageConverter
RepeatedMessageConverter() {}
virtual bool Convert(const base::Value& value,
- ScopedVector<NestedType>* field) const OVERRIDE {
+ ScopedVector<NestedType>* field) const override {
const base::ListValue* list = NULL;
if (!value.GetAsList(&list))
return false;
@@ -337,7 +337,7 @@ class RepeatedCustomValueConverter
: convert_func_(convert_func) {}
virtual bool Convert(const base::Value& value,
- ScopedVector<NestedType>* field) const OVERRIDE {
+ ScopedVector<NestedType>* field) const override {
const base::ListValue* list = NULL;
if (!value.GetAsList(&list))
return false;
diff --git a/base/json/json_value_serializer_unittest.cc b/base/json/json_value_serializer_unittest.cc
index 3be8bbf..dc43693 100644
--- a/base/json/json_value_serializer_unittest.cc
+++ b/base/json/json_value_serializer_unittest.cc
@@ -372,7 +372,7 @@ TEST(JSONValueSerializerTest, JSONReaderComments) {
class JSONFileValueSerializerTest : public testing::Test {
protected:
- virtual void SetUp() OVERRIDE {
+ virtual void SetUp() override {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
}