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

Unified Diff: chrome/common/json_value_serializer.h

Issue 39271: Change JSONFileValueSerializer to use FilePath by default. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/json_value_serializer.h
===================================================================
--- chrome/common/json_value_serializer.h (revision 11116)
+++ chrome/common/json_value_serializer.h (working copy)
@@ -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 @@
// 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 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_(json_file_path) {}
+ : json_file_path_(FilePath::FromWStringHack(json_file_path)) {}
~JSONFileValueSerializer() {}
@@ -89,7 +94,7 @@
Value* Deserialize(std::string* error_message);
private:
- std::wstring json_file_path_;
+ FilePath json_file_path_;
Matt Perry 2009/03/06 19:40:10 there doesn't need to be a corresponding .cc chang
Erik does not do reviews 2009/03/06 19:42:14 believe it or not, no. The reason is that all of
DISALLOW_EVIL_CONSTRUCTORS(JSONFileValueSerializer);
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698