summaryrefslogtreecommitdiffstats
path: root/base/values.h
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-19 13:32:16 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-19 13:32:16 +0000
commit9430e4bae7a8faa17b353f66ed572b72cf393c05 (patch)
treef19b02c0477d30aaf70203872739607afec657a2 /base/values.h
parent76b24b56f8c5d78bc5c32fbdd81102ba9ed82dcb (diff)
downloadchromium_src-9430e4bae7a8faa17b353f66ed572b72cf393c05.zip
chromium_src-9430e4bae7a8faa17b353f66ed572b72cf393c05.tar.gz
chromium_src-9430e4bae7a8faa17b353f66ed572b72cf393c05.tar.bz2
importer: use FilePath instead of wstring in some places
Added API to DictionaryValue to use ASCII where appropriate. BUG=24672 TEST=profile import still got my bookmarks Review URL: http://codereview.chromium.org/647016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/values.h')
-rw-r--r--base/values.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/values.h b/base/values.h
index e000508..ac6307a 100644
--- a/base/values.h
+++ b/base/values.h
@@ -214,6 +214,9 @@ class DictionaryValue : public Value {
virtual bool Equals(const Value* other) const;
// Returns true if the current dictionary has a value for the given key.
+ bool HasKeyASCII(const std::string& key) const;
+ // Deprecated version of the above. TODO: add a string16 version for Unicode.
+ // http://code.google.com/p/chromium/issues/detail?id=23581
bool HasKey(const std::wstring& key) const;
// Returns the number of Values in this dictionary.
@@ -264,6 +267,10 @@ class DictionaryValue : public Value {
bool GetBoolean(const std::wstring& path, bool* out_value) const;
bool GetInteger(const std::wstring& path, int* out_value) const;
bool GetReal(const std::wstring& path, double* out_value) const;
+ bool GetString(const std::string& path, string16* out_value) const;
+ bool GetStringASCII(const std::string& path, std::string* out_value) const;
+ // TODO: deprecate wstring accessors.
+ // http://code.google.com/p/chromium/issues/detail?id=23581
bool GetString(const std::wstring& path, std::string* out_value) const;
bool GetString(const std::wstring& path, std::wstring* out_value) const;
bool GetStringAsUTF16(const std::wstring& path, string16* out_value) const;