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

Unified Diff: base/values.h

Issue 11418048: Add copy and assignment to FundamentalValue and StringValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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 | base/values.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/values.h
diff --git a/base/values.h b/base/values.h
index d7263dfbc731fa8998af0de79f64936399cca4d8..e105818e5d3953edddcb7e410b015f7807d8ccbb 100644
--- a/base/values.h
+++ b/base/values.h
@@ -66,10 +66,9 @@ class BASE_EXPORT Value {
virtual ~Value();
- // Convenience methods for creating Value objects for various
- // kinds of values without thinking about which class implements them.
- // These can always be expected to return a valid Value*.
static Value* CreateNullValue();
+ // DEPRECATED: Do not use the following 5 functions. Instead, use
+ // new FundamentalValue or new StringValue.
static FundamentalValue* CreateBooleanValue(bool in_value);
static FundamentalValue* CreateIntegerValue(int in_value);
static FundamentalValue* CreateDoubleValue(double in_value);
@@ -115,16 +114,13 @@ class BASE_EXPORT Value {
static bool Equals(const Value* a, const Value* b);
protected:
- // This isn't safe for end-users (they should use the Create*Value()
- // static methods above), but it's useful for subclasses.
+ // These aren't safe for end-users, but they are useful for subclasses.
explicit Value(Type type);
+ Value(const Value& that);
+ Value& operator=(const Value& that);
private:
- Value();
-
Type type_;
-
- DISALLOW_COPY_AND_ASSIGN(Value);
};
// FundamentalValue represents the simple fundamental types of values.
@@ -148,8 +144,6 @@ class BASE_EXPORT FundamentalValue : public Value {
int integer_value_;
double double_value_;
};
-
- DISALLOW_COPY_AND_ASSIGN(FundamentalValue);
};
class BASE_EXPORT StringValue : public Value {
@@ -170,8 +164,6 @@ class BASE_EXPORT StringValue : public Value {
private:
std::string value_;
-
- DISALLOW_COPY_AND_ASSIGN(StringValue);
};
class BASE_EXPORT BinaryValue: public Value {
« no previous file with comments | « no previous file | base/values.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698