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

Unified Diff: base/values.h

Issue 148463003: libaddressinput - reduce number of copies in storage class by 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 6 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 | 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 8caf8350a8bfc76b00b96044213b55912466031f..a77cd3bdf702e5088faf6b04b88921a6173a956c 100644
--- a/base/values.h
+++ b/base/values.h
@@ -91,6 +91,7 @@ class BASE_EXPORT 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 GetAsString(const StringValue** out_value) const;
virtual bool GetAsList(ListValue** out_value);
virtual bool GetAsList(const ListValue** out_value) const;
virtual bool GetAsDictionary(DictionaryValue** out_value);
@@ -154,9 +155,14 @@ class BASE_EXPORT StringValue : public Value {
virtual ~StringValue();
+ // Returns |value_| as a pointer or reference.
+ std::string* GetString();
+ const std::string& GetString() const;
+
// Overridden from Value:
virtual bool GetAsString(std::string* out_value) const OVERRIDE;
virtual bool GetAsString(string16* out_value) const OVERRIDE;
+ virtual bool GetAsString(const StringValue** out_value) const OVERRIDE;
virtual StringValue* DeepCopy() const OVERRIDE;
virtual bool Equals(const Value* other) const OVERRIDE;
« 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