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

Unified Diff: chrome/common/json_value_serializer.h

Issue 5648004: Add the "virtual" keyword on method overrides that are missing it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missing file 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
« no previous file with comments | « chrome/browser/worker_host/worker_service.h ('k') | chrome/common/net/gaia/gaia_auth_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/json_value_serializer.h
diff --git a/chrome/common/json_value_serializer.h b/chrome/common/json_value_serializer.h
index 11b7b7af6c9a88a8ad9c1ec7fb649319c23c663d..e0c9569411ed656273232f154fc9976fadcbc195 100644
--- a/chrome/common/json_value_serializer.h
+++ b/chrome/common/json_value_serializer.h
@@ -33,12 +33,12 @@ class JSONStringValueSerializer : public ValueSerializer {
allow_trailing_comma_(false) {
}
- ~JSONStringValueSerializer();
+ virtual ~JSONStringValueSerializer();
// 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.
- bool Serialize(const Value& root);
+ virtual bool Serialize(const Value& root);
// Attempt to deserialize the data structure encoded in the string passed
// in to the constructor into a structure of Value objects. If the return
@@ -47,7 +47,7 @@ class JSONStringValueSerializer : public ValueSerializer {
// If |error_message| is non-null, it will be filled in with a formatted
// error message including the location of the error if appropriate.
// The caller takes ownership of the returned value.
- Value* Deserialize(int* error_code, std::string* error_message);
+ virtual Value* Deserialize(int* error_code, std::string* error_message);
void set_pretty_print(bool new_value) { pretty_print_ = new_value; }
bool pretty_print() { return pretty_print_; }
@@ -75,7 +75,7 @@ class JSONFileValueSerializer : public ValueSerializer {
explicit JSONFileValueSerializer(const FilePath& json_file_path)
: json_file_path_(json_file_path) {}
- ~JSONFileValueSerializer() {}
+ virtual ~JSONFileValueSerializer() {}
// DO NOT USE except in unit tests to verify the file was written properly.
// We should never serialize directly to a file since this will block the
@@ -85,7 +85,7 @@ class JSONFileValueSerializer : public 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.
- bool Serialize(const Value& root);
+ virtual bool Serialize(const Value& root);
// Attempt to deserialize the data structure encoded in the file passed
// in to the constructor into a structure of Value objects. If the return
@@ -94,7 +94,7 @@ class JSONFileValueSerializer : public ValueSerializer {
// If |error_message| is non-null, it will be filled in with a formatted
// error message including the location of the error if appropriate.
// The caller takes ownership of the returned value.
- Value* Deserialize(int* error_code, std::string* error_message);
+ virtual Value* Deserialize(int* error_code, std::string* error_message);
// This enum is designed to safely overlap with JSONReader::JsonParseError.
enum JsonFileError {
« no previous file with comments | « chrome/browser/worker_host/worker_service.h ('k') | chrome/common/net/gaia/gaia_auth_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698