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

Side by Side Diff: base/values.cc

Issue 388963002: Get rid of the rest of CreateStringValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweaks Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/values.h" 5 #include "base/values.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <ostream> 10 #include <ostream>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // static 97 // static
98 FundamentalValue* Value::CreateIntegerValue(int in_value) { 98 FundamentalValue* Value::CreateIntegerValue(int in_value) {
99 return new FundamentalValue(in_value); 99 return new FundamentalValue(in_value);
100 } 100 }
101 101
102 // static 102 // static
103 FundamentalValue* Value::CreateDoubleValue(double in_value) { 103 FundamentalValue* Value::CreateDoubleValue(double in_value) {
104 return new FundamentalValue(in_value); 104 return new FundamentalValue(in_value);
105 } 105 }
106 106
107 // static
108 StringValue* Value::CreateStringValue(const std::string& in_value) {
109 return new StringValue(in_value);
110 }
111
112 // static
113 StringValue* Value::CreateStringValue(const string16& in_value) {
114 return new StringValue(in_value);
115 }
116
117 bool Value::GetAsBoolean(bool* out_value) const { 107 bool Value::GetAsBoolean(bool* out_value) const {
118 return false; 108 return false;
119 } 109 }
120 110
121 bool Value::GetAsInteger(int* out_value) const { 111 bool Value::GetAsInteger(int* out_value) const {
122 return false; 112 return false;
123 } 113 }
124 114
125 bool Value::GetAsDouble(double* out_value) const { 115 bool Value::GetAsDouble(double* out_value) const {
126 return false; 116 return false;
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 1140
1151 std::ostream& operator<<(std::ostream& out, const Value& value) { 1141 std::ostream& operator<<(std::ostream& out, const Value& value) {
1152 std::string json; 1142 std::string json;
1153 JSONWriter::WriteWithOptions(&value, 1143 JSONWriter::WriteWithOptions(&value,
1154 JSONWriter::OPTIONS_PRETTY_PRINT, 1144 JSONWriter::OPTIONS_PRETTY_PRINT,
1155 &json); 1145 &json);
1156 return out << json; 1146 return out << json;
1157 } 1147 }
1158 1148
1159 } // namespace base 1149 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698