summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-06 20:58:47 +0000
committererikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-06 20:58:47 +0000
commit7c7da82d4b2f1e918ddeff9218545bec98184f84 (patch)
tree959815cf570f9a2391f1bb94ef733ed81d37db50
parent60c1c76bd89ee0f16a40429fb15e4263c0ae98ef (diff)
downloadchromium_src-7c7da82d4b2f1e918ddeff9218545bec98184f84.zip
chromium_src-7c7da82d4b2f1e918ddeff9218545bec98184f84.tar.gz
chromium_src-7c7da82d4b2f1e918ddeff9218545bec98184f84.tar.bz2
Change JSONFileValueSerializer to use FilePath by default.
Review URL: http://codereview.chromium.org/39271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11156 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/common/json_value_serializer.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/common/json_value_serializer.h b/chrome/common/json_value_serializer.h
index 47e4584..dd8da00 100644
--- a/chrome/common/json_value_serializer.h
+++ b/chrome/common/json_value_serializer.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/file_path.h"
#include "base/values.h"
class JSONStringValueSerializer : public ValueSerializer {
@@ -66,8 +67,12 @@ class JSONFileValueSerializer : public ValueSerializer {
// 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.
- JSONFileValueSerializer(const std::wstring& json_file_path)
+ JSONFileValueSerializer(const FilePath& json_file_path)
: json_file_path_(json_file_path) {}
+ // DEPRECATED - DO NOT USE
+ // TODO(port): remove references to this
+ JSONFileValueSerializer(const std::wstring& json_file_path)
+ : json_file_path_(FilePath::FromWStringHack(json_file_path)) {}
~JSONFileValueSerializer() {}
@@ -89,7 +94,7 @@ class JSONFileValueSerializer : public ValueSerializer {
Value* Deserialize(std::string* error_message);
private:
- std::wstring json_file_path_;
+ FilePath json_file_path_;
DISALLOW_EVIL_CONSTRUCTORS(JSONFileValueSerializer);
};