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

Side by Side Diff: base/json/json_string_value_serializer.cc

Issue 16797003: Make base use the proper Value namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwarnings fixed Created 7 years, 6 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
« no previous file with comments | « base/json/json_string_value_serializer.h ('k') | base/prefs/default_pref_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/json/json_string_value_serializer.h" 5 #include "base/json/json_string_value_serializer.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 using base::Value;
brettw 2013/06/13 22:49:30 I did a "using" ont his since it should be moved t
12
11 JSONStringValueSerializer::~JSONStringValueSerializer() {} 13 JSONStringValueSerializer::~JSONStringValueSerializer() {}
12 14
13 bool JSONStringValueSerializer::Serialize(const Value& root) { 15 bool JSONStringValueSerializer::Serialize(const Value& root) {
14 return SerializeInternal(root, false); 16 return SerializeInternal(root, false);
15 } 17 }
16 18
17 bool JSONStringValueSerializer::SerializeAndOmitBinaryValues( 19 bool JSONStringValueSerializer::SerializeAndOmitBinaryValues(
18 const Value& root) { 20 const Value& root) {
19 return SerializeInternal(root, true); 21 return SerializeInternal(root, true);
20 } 22 }
(...skipping 16 matching lines...) Expand all
37 Value* JSONStringValueSerializer::Deserialize(int* error_code, 39 Value* JSONStringValueSerializer::Deserialize(int* error_code,
38 std::string* error_str) { 40 std::string* error_str) {
39 if (!json_string_) 41 if (!json_string_)
40 return NULL; 42 return NULL;
41 43
42 return base::JSONReader::ReadAndReturnError(*json_string_, 44 return base::JSONReader::ReadAndReturnError(*json_string_,
43 allow_trailing_comma_ ? base::JSON_ALLOW_TRAILING_COMMAS : 45 allow_trailing_comma_ ? base::JSON_ALLOW_TRAILING_COMMAS :
44 base::JSON_PARSE_RFC, 46 base::JSON_PARSE_RFC,
45 error_code, error_str); 47 error_code, error_str);
46 } 48 }
OLDNEW
« no previous file with comments | « base/json/json_string_value_serializer.h ('k') | base/prefs/default_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698