diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-21 16:35:04 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-21 16:35:04 +0000 |
commit | 68d9d35f4cec33ccdd5931249e0c58fd7dca830a (patch) | |
tree | 1751feffa1fcbd851ff8779f8be6a1211ee45457 /base/values.h | |
parent | 7f0a77b0b2a5492f34554fdff9e8467e9d8db930 (diff) | |
download | chromium_src-68d9d35f4cec33ccdd5931249e0c58fd7dca830a.zip chromium_src-68d9d35f4cec33ccdd5931249e0c58fd7dca830a.tar.gz chromium_src-68d9d35f4cec33ccdd5931249e0c58fd7dca830a.tar.bz2 |
Add MoveToThread method to PrefMember to make it safe to read pref values from other threads.
BUG=73385
TEST=PrefMemberTest.MoveToThread
Review URL: http://codereview.chromium.org/6524041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/values.h')
-rw-r--r-- | base/values.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/base/values.h b/base/values.h index 408ca8b..5814a9f 100644 --- a/base/values.h +++ b/base/values.h @@ -31,12 +31,13 @@ #include "base/string16.h" #include "build/build_config.h" -class Value; -class FundamentalValue; -class StringValue; class BinaryValue; class DictionaryValue; +class FilePath; +class FundamentalValue; class ListValue; +class StringValue; +class Value; typedef std::vector<Value*> ValueVector; typedef std::map<std::string, Value*> ValueMap; @@ -68,6 +69,7 @@ class Value { static FundamentalValue* CreateDoubleValue(double in_value); static StringValue* CreateStringValue(const std::string& in_value); static StringValue* CreateStringValue(const string16& in_value); + static StringValue* CreateFilePathValue(const FilePath& in_value); // This one can return NULL if the input isn't valid. If the return value // is non-null, the new object has taken ownership of the buffer pointer. @@ -92,6 +94,7 @@ class Value { virtual bool GetAsDouble(double* out_value) const; virtual bool GetAsString(std::string* out_value) const; virtual bool GetAsString(string16* out_value) const; + virtual bool GetAsFilePath(FilePath* out_value) const; virtual bool GetAsList(ListValue** out_value); // This creates a deep copy of the entire Value tree, and returns a pointer @@ -159,6 +162,7 @@ class StringValue : public Value { // Subclassed methods virtual bool GetAsString(std::string* out_value) const; virtual bool GetAsString(string16* out_value) const; + virtual bool GetAsFilePath(FilePath* out_value) const; virtual StringValue* DeepCopy() const; virtual bool Equals(const Value* other) const; |