Break two classes defined in json_value_serializer.cc, .h into separate files.
This will allow the use of JSONStringValueSerializer in the NaCl sandbox.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9465030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123701 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/base/base.gypi b/base/base.gypi
index 8e0aed51..c82011e 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -126,11 +126,13 @@
'gtest_prod_util.h',
'hash_tables.h',
'id_map.h',
+ 'json/json_file_value_serializer.cc',
+ 'json/json_file_value_serializer.h',
'json/json_reader.cc',
'json/json_reader.h',
+ 'json/json_string_value_serializer.cc',
+ 'json/json_string_value_serializer.h',
'json/json_value_converter.h',
- 'json/json_value_serializer.cc',
- 'json/json_value_serializer.h',
'json/json_writer.cc',
'json/json_writer.h',
'json/string_escape.cc',
diff --git a/base/json/json_value_serializer.cc b/base/json/json_file_value_serializer.cc
similarity index 67%
rename from base/json/json_value_serializer.cc
rename to base/json/json_file_value_serializer.cc
index 0f776f6..2fac45131 100644
--- a/base/json/json_value_serializer.cc
+++ b/base/json/json_file_value_serializer.cc
@@ -1,56 +1,18 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/file_util.h"
-#include "base/json/json_reader.h"
-#include "base/json/json_writer.h"
-#include "base/string_util.h"
+#include "base/json/json_string_value_serializer.h"
+#include "base/logging.h"
const char* JSONFileValueSerializer::kAccessDenied = "Access denied.";
const char* JSONFileValueSerializer::kCannotReadFile = "Can't read file.";
const char* JSONFileValueSerializer::kFileLocked = "File locked.";
const char* JSONFileValueSerializer::kNoSuchFile = "File doesn't exist.";
-JSONStringValueSerializer::~JSONStringValueSerializer() {}
-
-bool JSONStringValueSerializer::Serialize(const Value& root) {
- return SerializeInternal(root, false);
-}
-
-bool JSONStringValueSerializer::SerializeAndOmitBinaryValues(
- const Value& root) {
- return SerializeInternal(root, true);
-}
-
-bool JSONStringValueSerializer::SerializeInternal(const Value& root,
- bool omit_binary_values) {
- if (!json_string_ || initialized_with_const_string_)
- return false;
-
- base::JSONWriter::WriteWithOptions(
- &root,
- pretty_print_,
- omit_binary_values ? base::JSONWriter::OPTIONS_OMIT_BINARY_VALUES : 0,
- json_string_);
- return true;
-}
-
-Value* JSONStringValueSerializer::Deserialize(int* error_code,
- std::string* error_str) {
- if (!json_string_)
- return NULL;
-
- return base::JSONReader::ReadAndReturnError(*json_string_,
- allow_trailing_comma_,
- error_code,
- error_str);
-}
-
-/******* File Serializer *******/
-
bool JSONFileValueSerializer::Serialize(const Value& root) {
return SerializeInternal(root, false);
}
diff --git a/base/json/json_file_value_serializer.h b/base/json/json_file_value_serializer.h
new file mode 100644
index 0000000..f92e776fc
--- /dev/null
+++ b/base/json/json_file_value_serializer.h
@@ -0,0 +1,89 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_JSON_JSON_FILE_VALUE_SERIALIZER_H_
+#define BASE_JSON_JSON_FILE_VALUE_SERIALIZER_H_
+#pragma once
+
+#include <string>
+
+#include "base/base_export.h"
+#include "base/basictypes.h"
+#include "base/file_path.h"
+#include "base/values.h"
+
+class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer {
+ public:
+ // json_file_patch is the path of a file that will be source of the
+ // deserialization or the destination of the serialization.
+ // When deserializing, the file should exist, but when serializing, the
+ // serializer will attempt to create the file at the specified location.
+ explicit JSONFileValueSerializer(const FilePath& json_file_path)
+ : json_file_path_(json_file_path),
+ allow_trailing_comma_(false) {}
+
+ 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
+ // thread. Instead, serialize to a string and write to the file you want on
+ // the file thread.
+ //
+ // 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 Value& root) OVERRIDE;
+
+ // Equivalent to Serialize(root) except binary values are omitted from the
+ // output.
+ bool SerializeAndOmitBinaryValues(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
+ // value is NULL, and if |error_code| is non-null, |error_code| will
+ // contain an integer error code (either JsonFileError or JsonParseError).
+ // 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.
+ virtual Value* Deserialize(int* error_code,
+ std::string* error_message) OVERRIDE;
+
+ // This enum is designed to safely overlap with JSONReader::JsonParseError.
+ enum JsonFileError {
+ JSON_NO_ERROR = 0,
+ JSON_ACCESS_DENIED = 1000,
+ JSON_CANNOT_READ_FILE,
+ JSON_FILE_LOCKED,
+ JSON_NO_SUCH_FILE
+ };
+
+ // File-specific error messages that can be returned.
+ static const char* kAccessDenied;
+ static const char* kCannotReadFile;
+ static const char* kFileLocked;
+ static const char* kNoSuchFile;
+
+ // Convert an error code into an error message. |error_code| is assumed to
+ // be a JsonFileError.
+ static const char* GetErrorMessageForCode(int error_code);
+
+ void set_allow_trailing_comma(bool new_value) {
+ allow_trailing_comma_ = new_value;
+ }
+
+ private:
+ bool SerializeInternal(const Value& root, bool omit_binary_values);
+
+ FilePath json_file_path_;
+ bool allow_trailing_comma_;
+
+ // A wrapper for file_util::ReadFileToString which returns a non-zero
+ // JsonFileError if there were file errors.
+ int ReadFileToString(std::string* json_string);
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(JSONFileValueSerializer);
+};
+
+#endif // BASE_JSON_JSON_FILE_VALUE_SERIALIZER_H_
+
diff --git a/base/json/json_string_value_serializer.cc b/base/json/json_string_value_serializer.cc
new file mode 100644
index 0000000..6d25c66
--- /dev/null
+++ b/base/json/json_string_value_serializer.cc
@@ -0,0 +1,45 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/json/json_string_value_serializer.h"
+
+#include "base/json/json_reader.h"
+#include "base/json/json_writer.h"
+#include "base/logging.h"
+
+JSONStringValueSerializer::~JSONStringValueSerializer() {}
+
+bool JSONStringValueSerializer::Serialize(const Value& root) {
+ return SerializeInternal(root, false);
+}
+
+bool JSONStringValueSerializer::SerializeAndOmitBinaryValues(
+ const Value& root) {
+ return SerializeInternal(root, true);
+}
+
+bool JSONStringValueSerializer::SerializeInternal(const Value& root,
+ bool omit_binary_values) {
+ if (!json_string_ || initialized_with_const_string_)
+ return false;
+
+ base::JSONWriter::WriteWithOptions(
+ &root,
+ pretty_print_,
+ omit_binary_values ? base::JSONWriter::OPTIONS_OMIT_BINARY_VALUES : 0,
+ json_string_);
+ return true;
+}
+
+Value* JSONStringValueSerializer::Deserialize(int* error_code,
+ std::string* error_str) {
+ if (!json_string_)
+ return NULL;
+
+ return base::JSONReader::ReadAndReturnError(*json_string_,
+ allow_trailing_comma_,
+ error_code,
+ error_str);
+}
+
diff --git a/base/json/json_string_value_serializer.h b/base/json/json_string_value_serializer.h
new file mode 100644
index 0000000..f867e3e1
--- /dev/null
+++ b/base/json/json_string_value_serializer.h
@@ -0,0 +1,78 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_JSON_JSON_STRING_VALUE_SERIALIZER_H_
+#define BASE_JSON_JSON_STRING_VALUE_SERIALIZER_H_
+#pragma once
+
+#include <string>
+
+#include "base/base_export.h"
+#include "base/basictypes.h"
+#include "base/file_path.h"
+#include "base/values.h"
+
+class BASE_EXPORT JSONStringValueSerializer : public base::ValueSerializer {
+ public:
+ // json_string is the string that will be source of the deserialization
+ // or the destination of the serialization. The caller of the constructor
+ // retains ownership of the string.
+ explicit JSONStringValueSerializer(std::string* json_string)
+ : json_string_(json_string),
+ initialized_with_const_string_(false),
+ pretty_print_(false),
+ allow_trailing_comma_(false) {
+ }
+
+ // This version allows initialization with a const string reference for
+ // deserialization only.
+ explicit JSONStringValueSerializer(const std::string& json_string)
+ : json_string_(&const_cast<std::string&>(json_string)),
+ initialized_with_const_string_(true),
+ pretty_print_(false),
+ allow_trailing_comma_(false) {
+ }
+
+ 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.
+ virtual bool Serialize(const Value& root) OVERRIDE;
+
+ // Equivalent to Serialize(root) except binary values are omitted from the
+ // output.
+ bool SerializeAndOmitBinaryValues(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
+ // value is NULL, and if |error_code| is non-null, |error_code| will
+ // contain an integer error code (either JsonFileError or JsonParseError).
+ // 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.
+ virtual Value* Deserialize(int* error_code,
+ std::string* error_message) OVERRIDE;
+
+ void set_pretty_print(bool new_value) { pretty_print_ = new_value; }
+ bool pretty_print() { return pretty_print_; }
+
+ void set_allow_trailing_comma(bool new_value) {
+ allow_trailing_comma_ = new_value;
+ }
+
+ private:
+ bool SerializeInternal(const Value& root, bool omit_binary_values);
+
+ std::string* json_string_;
+ bool initialized_with_const_string_;
+ bool pretty_print_; // If true, serialization will span multiple lines.
+ // If true, deserialization will allow trailing commas.
+ bool allow_trailing_comma_;
+
+ DISALLOW_COPY_AND_ASSIGN(JSONStringValueSerializer);
+};
+
+#endif // BASE_JSON_JSON_STRING_VALUE_SERIALIZER_H_
+
diff --git a/base/json/json_value_serializer.h b/base/json/json_value_serializer.h
deleted file mode 100644
index 7a925d4..0000000
--- a/base/json/json_value_serializer.h
+++ /dev/null
@@ -1,149 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_JSON_JSON_VALUE_SERIALIZER_H_
-#define BASE_JSON_JSON_VALUE_SERIALIZER_H_
-#pragma once
-
-#include <string>
-
-#include "base/base_export.h"
-#include "base/basictypes.h"
-#include "base/file_path.h"
-#include "base/values.h"
-
-class BASE_EXPORT JSONStringValueSerializer : public base::ValueSerializer {
- public:
- // json_string is the string that will be source of the deserialization
- // or the destination of the serialization. The caller of the constructor
- // retains ownership of the string.
- explicit JSONStringValueSerializer(std::string* json_string)
- : json_string_(json_string),
- initialized_with_const_string_(false),
- pretty_print_(false),
- allow_trailing_comma_(false) {
- }
-
- // This version allows initialization with a const string reference for
- // deserialization only.
- explicit JSONStringValueSerializer(const std::string& json_string)
- : json_string_(&const_cast<std::string&>(json_string)),
- initialized_with_const_string_(true),
- pretty_print_(false),
- allow_trailing_comma_(false) {
- }
-
- 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.
- virtual bool Serialize(const Value& root) OVERRIDE;
-
- // Equivalent to Serialize(root) except binary values are omitted from the
- // output.
- bool SerializeAndOmitBinaryValues(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
- // value is NULL, and if |error_code| is non-null, |error_code| will
- // contain an integer error code (either JsonFileError or JsonParseError).
- // 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.
- virtual Value* Deserialize(int* error_code,
- std::string* error_message) OVERRIDE;
-
- void set_pretty_print(bool new_value) { pretty_print_ = new_value; }
- bool pretty_print() { return pretty_print_; }
-
- void set_allow_trailing_comma(bool new_value) {
- allow_trailing_comma_ = new_value;
- }
-
- private:
- bool SerializeInternal(const Value& root, bool omit_binary_values);
-
- std::string* json_string_;
- bool initialized_with_const_string_;
- bool pretty_print_; // If true, serialization will span multiple lines.
- // If true, deserialization will allow trailing commas.
- bool allow_trailing_comma_;
-
- DISALLOW_COPY_AND_ASSIGN(JSONStringValueSerializer);
-};
-
-class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer {
- public:
- // json_file_patch is the path of a file that will be source of the
- // deserialization or the destination of the serialization.
- // When deserializing, the file should exist, but when serializing, the
- // serializer will attempt to create the file at the specified location.
- explicit JSONFileValueSerializer(const FilePath& json_file_path)
- : json_file_path_(json_file_path),
- allow_trailing_comma_(false) {}
-
- 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
- // thread. Instead, serialize to a string and write to the file you want on
- // the file thread.
- //
- // 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 Value& root) OVERRIDE;
-
- // Equivalent to Serialize(root) except binary values are omitted from the
- // output.
- bool SerializeAndOmitBinaryValues(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
- // value is NULL, and if |error_code| is non-null, |error_code| will
- // contain an integer error code (either JsonFileError or JsonParseError).
- // 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.
- virtual Value* Deserialize(int* error_code,
- std::string* error_message) OVERRIDE;
-
- // This enum is designed to safely overlap with JSONReader::JsonParseError.
- enum JsonFileError {
- JSON_NO_ERROR = 0,
- JSON_ACCESS_DENIED = 1000,
- JSON_CANNOT_READ_FILE,
- JSON_FILE_LOCKED,
- JSON_NO_SUCH_FILE
- };
-
- // File-specific error messages that can be returned.
- static const char* kAccessDenied;
- static const char* kCannotReadFile;
- static const char* kFileLocked;
- static const char* kNoSuchFile;
-
- // Convert an error code into an error message. |error_code| is assumed to
- // be a JsonFileError.
- static const char* GetErrorMessageForCode(int error_code);
-
- void set_allow_trailing_comma(bool new_value) {
- allow_trailing_comma_ = new_value;
- }
-
- private:
- bool SerializeInternal(const Value& root, bool omit_binary_values);
-
- FilePath json_file_path_;
- bool allow_trailing_comma_;
-
- // A wrapper for file_util::ReadFileToString which returns a non-zero
- // JsonFileError if there were file errors.
- int ReadFileToString(std::string* json_string);
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(JSONFileValueSerializer);
-};
-
-#endif // BASE_JSON_JSON_VALUE_SERIALIZER_H_
diff --git a/base/json/json_value_serializer_unittest.cc b/base/json/json_value_serializer_unittest.cc
index c27af11..89e3e4d 100644
--- a/base/json/json_value_serializer_unittest.cc
+++ b/base/json/json_value_serializer_unittest.cc
@@ -1,13 +1,13 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/json/json_value_serializer.h"
-
#include <string>
#include "base/file_util.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/json/json_reader.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "base/scoped_temp_dir.h"
#include "base/string_util.h"
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc
index 62d5b929..520820f 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,7 +11,7 @@
#include "base/i18n/break_iterator.h"
#include "base/i18n/case_conversion.h"
#include "base/i18n/icu_string_conversions.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/message_loop.h"
#include "base/string16.h"
#include "base/utf_string_conversions.h"
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 38b1b0b5..291603d 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -12,7 +12,7 @@
#include "base/debug/trace_event.h"
#include "base/file_path.h"
#include "base/json/json_reader.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/json/json_writer.h"
#include "base/json/string_escape.h"
#include "base/message_loop.h"
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index e621e8b2..9491061 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -13,7 +13,6 @@
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
#include "base/json/json_writer.h"
#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
diff --git a/chrome/browser/bookmarks/bookmark_codec_unittest.cc b/chrome/browser/bookmarks/bookmark_codec_unittest.cc
index 9598250..dbc1681 100644
--- a/chrome/browser/bookmarks/bookmark_codec_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_codec_unittest.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/string_util.h"
diff --git a/chrome/browser/bookmarks/bookmark_storage.cc b/chrome/browser/bookmarks/bookmark_storage.cc
index 3de96ff..a520475 100644
--- a/chrome/browser/bookmarks/bookmark_storage.cc
+++ b/chrome/browser/bookmarks/bookmark_storage.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,7 +8,8 @@
#include "base/compiler_specific.h"
#include "base/file_util.h"
#include "base/file_util_proxy.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/metrics/histogram.h"
#include "base/time.h"
#include "chrome/browser/bookmarks/bookmark_codec.h"
diff --git a/chrome/browser/chromeos/cros/onc_network_parser.cc b/chrome/browser/chromeos/cros/onc_network_parser.cc
index 59d6e9a..4217d4d 100644
--- a/chrome/browser/chromeos/cros/onc_network_parser.cc
+++ b/chrome/browser/chromeos/cros/onc_network_parser.cc
@@ -8,7 +8,7 @@
#include <pk11pub.h>
#include "base/base64.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "base/json/json_writer.h" // for debug output only.
#include "base/stringprintf.h"
diff --git a/chrome/browser/chromeos/cros/onc_network_parser_unittest.cc b/chrome/browser/chromeos/cros/onc_network_parser_unittest.cc
index b14a607..c71e923 100644
--- a/chrome/browser/chromeos/cros/onc_network_parser_unittest.cc
+++ b/chrome/browser/chromeos/cros/onc_network_parser_unittest.cc
@@ -9,7 +9,7 @@
#include <pk11pub.h>
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/lazy_instance.h"
#include "base/message_loop.h"
#include "base/path_service.h"
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
index 9642994..d9441e2d 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
@@ -4,7 +4,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/path_service.h"
#include "base/string16.h"
#include "base/time.h"
diff --git a/chrome/browser/chromeos/gdata/gdata_parser_unittest.cc b/chrome/browser/chromeos/gdata/gdata_parser_unittest.cc
index 94c9aab..9d4189d 100644
--- a/chrome/browser/chromeos/gdata/gdata_parser_unittest.cc
+++ b/chrome/browser/chromeos/gdata/gdata_parser_unittest.cc
@@ -4,7 +4,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/path_service.h"
#include "base/string16.h"
#include "base/time.h"
diff --git a/chrome/browser/chromeos/proxy_config_service_impl.cc b/chrome/browser/chromeos/proxy_config_service_impl.cc
index 5e74ae1..362ac09 100644
--- a/chrome/browser/chromeos/proxy_config_service_impl.cc
+++ b/chrome/browser/chromeos/proxy_config_service_impl.cc
@@ -7,7 +7,7 @@
#include <ostream>
#include "base/bind.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/logging.h"
#include "base/string_util.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
diff --git a/chrome/browser/component_updater/component_installers_unittest.cc b/chrome/browser/component_updater/component_installers_unittest.cc
index 14f8807a..d9359bd 100644
--- a/chrome/browser/component_updater/component_installers_unittest.cc
+++ b/chrome/browser/component_updater/component_installers_unittest.cc
@@ -6,7 +6,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/path_service.h"
diff --git a/chrome/browser/component_updater/component_unpacker.cc b/chrome/browser/component_updater/component_unpacker.cc
index a431690..a15d13a 100644
--- a/chrome/browser/component_updater/component_unpacker.cc
+++ b/chrome/browser/component_updater/component_unpacker.cc
@@ -8,7 +8,7 @@
#include <vector>
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/memory/scoped_handle.h"
#include "base/string_number_conversions.h"
#include "base/stringprintf.h"
diff --git a/chrome/browser/diagnostics/recon_diagnostics.cc b/chrome/browser/diagnostics/recon_diagnostics.cc
index ed56dae..64d9756 100644
--- a/chrome/browser/diagnostics/recon_diagnostics.cc
+++ b/chrome/browser/diagnostics/recon_diagnostics.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,7 +8,7 @@
#include "base/file_util.h"
#include "base/json/json_reader.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
diff --git a/chrome/browser/extensions/api/webrequest/webrequest_api_unittest.cc b/chrome/browser/extensions/api/webrequest/webrequest_api_unittest.cc
index 3138314..4b73729a 100644
--- a/chrome/browser/extensions/api/webrequest/webrequest_api_unittest.cc
+++ b/chrome/browser/extensions/api/webrequest/webrequest_api_unittest.cc
@@ -8,7 +8,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/memory/weak_ptr.h"
#include "base/path_service.h"
#include "base/stl_util.h"
diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc
index cd07a37..2a0b103 100644
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -6,8 +6,8 @@
#include "base/command_line.h"
#include "base/file_util.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/path_service.h"
-#include "base/json/json_value_serializer.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
diff --git a/chrome/browser/extensions/convert_user_script.cc b/chrome/browser/extensions/convert_user_script.cc
index 57e09c5..194bece 100644
--- a/chrome/browser/extensions/convert_user_script.cc
+++ b/chrome/browser/extensions/convert_user_script.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,7 +10,7 @@
#include "base/base64.h"
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/path_service.h"
#include "base/scoped_temp_dir.h"
#include "base/string_util.h"
diff --git a/chrome/browser/extensions/convert_web_app.cc b/chrome/browser/extensions/convert_web_app.cc
index 26fc3a8f..6d408db 100644
--- a/chrome/browser/extensions/convert_web_app.cc
+++ b/chrome/browser/extensions/convert_web_app.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -12,7 +12,7 @@
#include "base/base64.h"
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/scoped_temp_dir.h"
diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc
index f75be373..b13ab8f 100644
--- a/chrome/browser/extensions/extension_function_dispatcher.cc
+++ b/chrome/browser/extensions/extension_function_dispatcher.cc
@@ -6,7 +6,7 @@
#include <map>
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
#include "base/process_util.h"
diff --git a/chrome/browser/extensions/extension_icon_manager_unittest.cc b/chrome/browser/extensions/extension_icon_manager_unittest.cc
index 2a47c40..d0401c99 100644
--- a/chrome/browser/extensions/extension_icon_manager_unittest.cc
+++ b/chrome/browser/extensions/extension_icon_manager_unittest.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/values.h"
diff --git a/chrome/browser/extensions/extension_info_map_unittest.cc b/chrome/browser/extensions/extension_info_map_unittest.cc
index a0a05a37..2216b34 100644
--- a/chrome/browser/extensions/extension_info_map_unittest.cc
+++ b/chrome/browser/extensions/extension_info_map_unittest.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/message_loop.h"
#include "base/path_service.h"
#include "chrome/browser/extensions/extension_info_map.h"
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index bcc2ae0c..b5d25fa3 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -12,8 +12,9 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/file_util.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/json/json_reader.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop.h"
diff --git a/chrome/browser/extensions/extension_ui_unittest.cc b/chrome/browser/extensions/extension_ui_unittest.cc
index c92d7422..634edd22 100644
--- a/chrome/browser/extensions/extension_ui_unittest.cc
+++ b/chrome/browser/extensions/extension_ui_unittest.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/path_service.h"
#include "base/string_util.h"
#include "chrome/browser/ui/webui/options/extension_settings_handler.h"
diff --git a/chrome/browser/extensions/external_pref_extension_loader.cc b/chrome/browser/extensions/external_pref_extension_loader.cc
index ad30c3b..e64e125 100644
--- a/chrome/browser/extensions/external_pref_extension_loader.cc
+++ b/chrome/browser/extensions/external_pref_extension_loader.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,7 +7,8 @@
#include "base/bind.h"
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/path_service.h"
diff --git a/chrome/browser/extensions/image_loading_tracker_unittest.cc b/chrome/browser/extensions/image_loading_tracker_unittest.cc
index 820bde0..3f4983e 100644
--- a/chrome/browser/extensions/image_loading_tracker_unittest.cc
+++ b/chrome/browser/extensions/image_loading_tracker_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/message_loop.h"
#include "base/path_service.h"
#include "chrome/browser/extensions/image_loading_tracker.h"
diff --git a/chrome/browser/extensions/permissions_updater_unittest.cc b/chrome/browser/extensions/permissions_updater_unittest.cc
index 30e38de..36226f8 100644
--- a/chrome/browser/extensions/permissions_updater_unittest.cc
+++ b/chrome/browser/extensions/permissions_updater_unittest.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/file_path.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/memory/ref_counted.h"
#include "base/path_service.h"
#include "base/values.h"
diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.cc b/chrome/browser/extensions/sandboxed_extension_unpacker.cc
index 6b35fb7..8fa01ae 100644
--- a/chrome/browser/extensions/sandboxed_extension_unpacker.cc
+++ b/chrome/browser/extensions/sandboxed_extension_unpacker.cc
@@ -10,7 +10,7 @@
#include "base/bind.h"
#include "base/file_util.h"
#include "base/file_util_proxy.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/memory/scoped_handle.h"
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc
index 8718392..7ceedfdb 100644
--- a/chrome/browser/extensions/user_script_listener_unittest.cc
+++ b/chrome/browser/extensions/user_script_listener_unittest.cc
@@ -1,11 +1,11 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/file_util.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/message_loop.h"
#include "base/threading/thread.h"
-#include "base/json/json_value_serializer.h"
#include "chrome/browser/extensions/extension_service_unittest.h"
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/extensions/user_script_listener.h"
diff --git a/chrome/browser/intents/cws_intents_registry.cc b/chrome/browser/intents/cws_intents_registry.cc
index d074a249..852aa31 100644
--- a/chrome/browser/intents/cws_intents_registry.cc
+++ b/chrome/browser/intents/cws_intents_registry.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/intents/cws_intents_registry.h"
#include "base/callback.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "base/string16.h"
diff --git a/chrome/browser/intents/web_intents_registry_unittest.cc b/chrome/browser/intents/web_intents_registry_unittest.cc
index 03a33c8..0ff565e 100644
--- a/chrome/browser/intents/web_intents_registry_unittest.cc
+++ b/chrome/browser/intents/web_intents_registry_unittest.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/scoped_temp_dir.h"
diff --git a/chrome/browser/policy/config_dir_policy_provider.cc b/chrome/browser/policy/config_dir_policy_provider.cc
index f708fc59..e8cb43c 100644
--- a/chrome/browser/policy/config_dir_policy_provider.cc
+++ b/chrome/browser/policy/config_dir_policy_provider.cc
@@ -9,7 +9,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/logging.h"
#include "base/platform_file.h"
#include "chrome/browser/policy/policy_map.h"
diff --git a/chrome/browser/policy/config_dir_policy_provider_unittest.cc b/chrome/browser/policy/config_dir_policy_provider_unittest.cc
index 55299c9..6963b8c 100644
--- a/chrome/browser/policy/config_dir_policy_provider_unittest.cc
+++ b/chrome/browser/policy/config_dir_policy_provider_unittest.cc
@@ -4,7 +4,7 @@
#include "base/compiler_specific.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/message_loop.h"
#include "base/scoped_temp_dir.h"
#include "base/string_number_conversions.h"
diff --git a/chrome/browser/prefs/pref_model_associator.cc b/chrome/browser/prefs/pref_model_associator.cc
index 45d4332..0f48fd0b 100644
--- a/chrome/browser/prefs/pref_model_associator.cc
+++ b/chrome/browser/prefs/pref_model_associator.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,7 +6,7 @@
#include "base/auto_reset.h"
#include "base/json/json_reader.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/utf_string_conversions.h"
diff --git a/chrome/browser/prefs/pref_service_uitest.cc b/chrome/browser/prefs/pref_service_uitest.cc
index aea9bd08..669fc95 100644
--- a/chrome/browser/prefs/pref_service_uitest.cc
+++ b/chrome/browser/prefs/pref_service_uitest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,7 +6,7 @@
#include "base/command_line.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/scoped_temp_dir.h"
#include "base/test/test_file_util.h"
#include "base/values.h"
diff --git a/chrome/browser/sync/profile_sync_service_preference_unittest.cc b/chrome/browser/sync/profile_sync_service_preference_unittest.cc
index 0406cae..e67b0c97 100644
--- a/chrome/browser/sync/profile_sync_service_preference_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_preference_unittest.cc
@@ -9,7 +9,7 @@
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/json/json_reader.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/location.h"
#include "base/stl_util.h"
#include "base/string_piece.h"
diff --git a/chrome/browser/task_profiler/task_profiler_data_serializer.cc b/chrome/browser/task_profiler/task_profiler_data_serializer.cc
index d9a467d..fd76741 100644
--- a/chrome/browser/task_profiler/task_profiler_data_serializer.cc
+++ b/chrome/browser/task_profiler/task_profiler_data_serializer.cc
@@ -6,7 +6,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/time.h"
#include "base/tracked_objects.h"
#include "content/public/common/content_client.h"
diff --git a/chrome/browser/themes/browser_theme_pack_unittest.cc b/chrome/browser/themes/browser_theme_pack_unittest.cc
index 4fa8441..c13c72f 100644
--- a/chrome/browser/themes/browser_theme_pack_unittest.cc
+++ b/chrome/browser/themes/browser_theme_pack_unittest.cc
@@ -1,12 +1,12 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/themes/browser_theme_pack.h"
#include "base/file_util.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/json/json_reader.h"
-#include "base/json/json_value_serializer.h"
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/scoped_temp_dir.h"
diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller_unittest.mm b/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller_unittest.mm
index 7c1caaf..4c019753 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller_unittest.mm
@@ -7,7 +7,7 @@
#include "base/compiler_specific.h"
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#import "base/memory/scoped_nsobject.h"
#include "base/path_service.h"
#include "base/sys_string_conversions.h"
diff --git a/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc
index 9a27db5..705fe32 100644
--- a/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/system_options_handler.cc
@@ -10,7 +10,6 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
-#include "base/json/json_value_serializer.h"
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
diff --git a/chrome/browser/ui/webui/quota_internals_ui.cc b/chrome/browser/ui/webui/quota_internals_ui.cc
index 12df8e05..9f437e4f 100644
--- a/chrome/browser/ui/webui/quota_internals_ui.cc
+++ b/chrome/browser/ui/webui/quota_internals_ui.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,7 +6,6 @@
#include <string>
-#include "base/json/json_value_serializer.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc
index 855c2760..3428486 100644
--- a/chrome/common/extensions/extension_file_util.cc
+++ b/chrome/common/extensions/extension_file_util.cc
@@ -8,7 +8,7 @@
#include <vector>
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/path_service.h"
diff --git a/chrome/common/extensions/extension_file_util_unittest.cc b/chrome/common/extensions/extension_file_util_unittest.cc
index 78fe617..7dc8fd1 100644
--- a/chrome/common/extensions/extension_file_util_unittest.cc
+++ b/chrome/common/extensions/extension_file_util_unittest.cc
@@ -5,7 +5,7 @@
#include "chrome/common/extensions/extension_file_util.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/path_service.h"
#include "base/scoped_temp_dir.h"
#include "base/stringprintf.h"
diff --git a/chrome/common/extensions/extension_l10n_util.cc b/chrome/common/extensions/extension_l10n_util.cc
index cb404b9..64d8384 100644
--- a/chrome/common/extensions/extension_l10n_util.cc
+++ b/chrome/common/extensions/extension_l10n_util.cc
@@ -10,7 +10,7 @@
#include <vector>
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/logging.h"
#include "base/memory/linked_ptr.h"
#include "base/stringprintf.h"
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc
index 40ff514..ccc9210 100644
--- a/chrome/common/extensions/extension_manifests_unittest.cc
+++ b/chrome/common/extensions/extension_manifests_unittest.cc
@@ -12,7 +12,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/i18n/rtl.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/string_number_conversions.h"
diff --git a/chrome/common/extensions/extension_permission_set_unittest.cc b/chrome/common/extensions/extension_permission_set_unittest.cc
index 8dadb08a..b9c91b511 100644
--- a/chrome/common/extensions/extension_permission_set_unittest.cc
+++ b/chrome/common/extensions/extension_permission_set_unittest.cc
@@ -4,7 +4,7 @@
#include "chrome/common/extensions/extension_permission_set.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/utf_string_conversions.h"
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc
index 41438fda..3fb925e 100644
--- a/chrome/common/extensions/extension_unittest.cc
+++ b/chrome/common/extensions/extension_unittest.cc
@@ -7,7 +7,7 @@
#include "base/format_macros.h"
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/path_service.h"
#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
diff --git a/chrome/common/extensions/extension_unpacker.cc b/chrome/common/extensions/extension_unpacker.cc
index caa8fac..aded697 100644
--- a/chrome/common/extensions/extension_unpacker.cc
+++ b/chrome/common/extensions/extension_unpacker.cc
@@ -7,7 +7,7 @@
#include <set>
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/memory/scoped_handle.h"
#include "base/scoped_temp_dir.h"
#include "base/string_util.h"
diff --git a/chrome/common/json_pref_store.cc b/chrome/common/json_pref_store.cc
index 225c366c..d63d800d 100644
--- a/chrome/common/json_pref_store.cc
+++ b/chrome/common/json_pref_store.cc
@@ -9,7 +9,8 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop_proxy.h"
#include "base/values.h"
diff --git a/chrome/common/json_schema_validator_unittest_base.cc b/chrome/common/json_schema_validator_unittest_base.cc
index ac07f5ce..3e1ee739 100644
--- a/chrome/common/json_schema_validator_unittest_base.cc
+++ b/chrome/common/json_schema_validator_unittest_base.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,7 +9,7 @@
#include <limits>
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
diff --git a/chrome/common/json_value_serializer_perftest.cc b/chrome/common/json_value_serializer_perftest.cc
index 86b0f9db..791dc152 100644
--- a/chrome/common/json_value_serializer_perftest.cc
+++ b/chrome/common/json_value_serializer_perftest.cc
@@ -1,11 +1,11 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <vector>
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/path_service.h"
#include "base/perftimer.h"
#include "base/string_util.h"
diff --git a/chrome/common/json_value_serializer_unittest.cc b/chrome/common/json_value_serializer_unittest.cc
index 2ee9f61..7cf4e297 100644
--- a/chrome/common/json_value_serializer_unittest.cc
+++ b/chrome/common/json_value_serializer_unittest.cc
@@ -1,11 +1,12 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/basictypes.h"
#include "base/file_util.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/json/json_reader.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/json/json_writer.h"
#include "base/path_service.h"
#include "base/scoped_temp_dir.h"
diff --git a/chrome/common/jstemplate_builder.cc b/chrome/common/jstemplate_builder.cc
index e633bffb..0fda75d 100644
--- a/chrome/common/jstemplate_builder.cc
+++ b/chrome/common/jstemplate_builder.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,7 +7,8 @@
#include "chrome/common/jstemplate_builder.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/logging.h"
#include "base/string_util.h"
#include "grit/common_resources.h"
diff --git a/chrome/common/web_apps_unittest.cc b/chrome/common/web_apps_unittest.cc
index 85898be..20db234 100644
--- a/chrome/common/web_apps_unittest.cc
+++ b/chrome/common/web_apps_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,7 +6,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/utf_string_conversions.h"
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index b3e2828..251cb15 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -14,7 +14,7 @@
#include "base/command_line.h"
#include "base/file_path.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/process_util.h"
diff --git a/chrome/installer/util/google_chrome_distribution_unittest.cc b/chrome/installer/util/google_chrome_distribution_unittest.cc
index 11767c3..6e9719c 100644
--- a/chrome/installer/util/google_chrome_distribution_unittest.cc
+++ b/chrome/installer/util/google_chrome_distribution_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -6,7 +6,7 @@
#include <windows.h>
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_update_constants.h"
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index 3479bf8..ff9fdc1 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -15,7 +15,6 @@
#include "base/command_line.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
diff --git a/chrome/installer/util/master_preferences.cc b/chrome/installer/util/master_preferences.cc
index 573fd847..4f5ab43 100644
--- a/chrome/installer/util/master_preferences.cc
+++ b/chrome/installer/util/master_preferences.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,7 +6,7 @@
#include "base/environment.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/path_service.h"
diff --git a/chrome/installer/util/master_preferences_unittest.cc b/chrome/installer/util/master_preferences_unittest.cc
index a6738a6..01b9a0bd 100644
--- a/chrome/installer/util/master_preferences_unittest.cc
+++ b/chrome/installer/util/master_preferences_unittest.cc
@@ -5,10 +5,10 @@
// Unit tests for master preferences related methods.
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/stringprintf.h"
+#include "base/values.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/installer/util/master_preferences.h"
#include "chrome/installer/util/master_preferences_constants.h"
diff --git a/chrome/renderer/extensions/extension_helper.cc b/chrome/renderer/extensions/extension_helper.cc
index 4243c82..d144f2c 100644
--- a/chrome/renderer/extensions/extension_helper.cc
+++ b/chrome/renderer/extensions/extension_helper.cc
@@ -7,7 +7,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/lazy_instance.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
diff --git a/chrome/test/automation/automation_json_requests.cc b/chrome/test/automation/automation_json_requests.cc
index af122f6..055fa1ba 100644
--- a/chrome/test/automation/automation_json_requests.cc
+++ b/chrome/test/automation/automation_json_requests.cc
@@ -8,7 +8,7 @@
#include "base/file_path.h"
#include "base/format_macros.h"
#include "base/json/json_reader.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/json/json_writer.h"
#include "base/memory/scoped_ptr.h"
#include "base/stringprintf.h"
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc
index b6d5589..a1768f4 100644
--- a/chrome/test/automation/automation_proxy_uitest.cc
+++ b/chrome/test/automation/automation_proxy_uitest.cc
@@ -9,7 +9,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/i18n/rtl.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/md5.h"
#include "base/memory/scoped_ptr.h"
#include "base/scoped_temp_dir.h"
diff --git a/chrome/test/automation/javascript_execution_controller.cc b/chrome/test/automation/javascript_execution_controller.cc
index 6b1862c..9918bb1 100644
--- a/chrome/test/automation/javascript_execution_controller.cc
+++ b/chrome/test/automation/javascript_execution_controller.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/test/automation/javascript_execution_controller.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "chrome/test/automation/javascript_message_utils.h"
using javascript_utils::JavaScriptPrintf;
diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc
index b3a35ba9..64a8a1d 100644
--- a/chrome/test/automation/tab_proxy.cc
+++ b/chrome/test/automation/tab_proxy.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/logging.h"
#include "base/string16.h"
#include "base/threading/platform_thread.h"
diff --git a/chrome/test/perf/dom_checker_uitest.cc b/chrome/test/perf/dom_checker_uitest.cc
index 4f3a3c3..4afbe08 100644
--- a/chrome/test/perf/dom_checker_uitest.cc
+++ b/chrome/test/perf/dom_checker_uitest.cc
@@ -1,11 +1,11 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/string_split.h"
diff --git a/chrome/test/perf/dromaeo_benchmark_uitest.cc b/chrome/test/perf/dromaeo_benchmark_uitest.cc
index 7690ff3..945344a 100644
--- a/chrome/test/perf/dromaeo_benchmark_uitest.cc
+++ b/chrome/test/perf/dromaeo_benchmark_uitest.cc
@@ -1,11 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
#include "base/path_service.h"
#include "base/string_util.h"
#include "base/test/test_timeouts.h"
diff --git a/chrome/test/perf/sunspider_uitest.cc b/chrome/test/perf/sunspider_uitest.cc
index 02ad23ff3..8a0961e 100644
--- a/chrome/test/perf/sunspider_uitest.cc
+++ b/chrome/test/perf/sunspider_uitest.cc
@@ -1,10 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/command_line.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
#include "base/path_service.h"
#include "base/string_util.h"
#include "base/test/test_timeouts.h"
diff --git a/chrome/test/perf/v8_benchmark_uitest.cc b/chrome/test/perf/v8_benchmark_uitest.cc
index 0d0ba2b77..031c6240 100644
--- a/chrome/test/perf/v8_benchmark_uitest.cc
+++ b/chrome/test/perf/v8_benchmark_uitest.cc
@@ -1,11 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
#include "base/path_service.h"
#include "base/string_util.h"
#include "base/test/test_timeouts.h"
diff --git a/chrome/test/ui/javascript_test_util.cc b/chrome/test/ui/javascript_test_util.cc
index b71d67f..5f97123 100644
--- a/chrome/test/ui/javascript_test_util.cc
+++ b/chrome/test/ui/javascript_test_util.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/test/ui/javascript_test_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/string_number_conversions.h"
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 3d179946..d5ce43ee 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -18,7 +18,7 @@
#include "base/environment.h"
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/process_util.h"
diff --git a/content/renderer/dom_automation_controller.cc b/content/renderer/dom_automation_controller.cc
index b1c4fee..0955a6a 100644
--- a/content/renderer/dom_automation_controller.cc
+++ b/content/renderer/dom_automation_controller.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,7 +6,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_string_value_serializer.h"
#include "base/string_util.h"
#include "content/common/view_messages.h"
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index df780c11..64162139 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -13,7 +13,6 @@
#include "base/bind_helpers.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
-#include "base/json/json_value_serializer.h"
#include "base/json/json_writer.h"
#include "base/lazy_instance.h"
#include "base/metrics/histogram.h"
diff --git a/remoting/host/policy_hack/nat_policy_linux.cc b/remoting/host/policy_hack/nat_policy_linux.cc
index 6037ddcf..31af1067 100644
--- a/remoting/host/policy_hack/nat_policy_linux.cc
+++ b/remoting/host/policy_hack/nat_policy_linux.cc
@@ -19,7 +19,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/files/file_path_watcher.h"
-#include "base/json/json_value_serializer.h"
+#include "base/json/json_file_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop_proxy.h"