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

Side by Side Diff: base/json/json_reader.h

Issue 7461141: Rename BASE_API to BASE_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/global_descriptors_posix.h ('k') | base/json/json_writer.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // A JSON parser. Converts strings of JSON into a Value object (see 5 // A JSON parser. Converts strings of JSON into a Value object (see
6 // base/values.h). 6 // base/values.h).
7 // http://www.ietf.org/rfc/rfc4627.txt?number=4627 7 // http://www.ietf.org/rfc/rfc4627.txt?number=4627
8 // 8 //
9 // Known limitations/deviations from the RFC: 9 // Known limitations/deviations from the RFC:
10 // - Only knows how to parse ints within the range of a signed 32 bit int and 10 // - Only knows how to parse ints within the range of a signed 32 bit int and
(...skipping 16 matching lines...) Expand all
27 // TODO(aa): Consider making the constructor public and the static Read() method 27 // TODO(aa): Consider making the constructor public and the static Read() method
28 // only a convenience for the common uses with more complex configuration going 28 // only a convenience for the common uses with more complex configuration going
29 // on the instance. 29 // on the instance.
30 30
31 #ifndef BASE_JSON_JSON_READER_H_ 31 #ifndef BASE_JSON_JSON_READER_H_
32 #define BASE_JSON_JSON_READER_H_ 32 #define BASE_JSON_JSON_READER_H_
33 #pragma once 33 #pragma once
34 34
35 #include <string> 35 #include <string>
36 36
37 #include "base/base_api.h" 37 #include "base/base_export.h"
38 #include "base/basictypes.h" 38 #include "base/basictypes.h"
39 39
40 // Chromium and Chromium OS check out gtest to different places, so we're 40 // Chromium and Chromium OS check out gtest to different places, so we're
41 // unable to compile on both if we include gtest_prod.h here. Instead, include 41 // unable to compile on both if we include gtest_prod.h here. Instead, include
42 // its only contents -- this will need to be updated if the macro ever changes. 42 // its only contents -- this will need to be updated if the macro ever changes.
43 #define FRIEND_TEST(test_case_name, test_name)\ 43 #define FRIEND_TEST(test_case_name, test_name)\
44 friend class test_case_name##_##test_name##_Test 44 friend class test_case_name##_##test_name##_Test
45 45
46 namespace base { 46 namespace base {
47 47
48 class Value; 48 class Value;
49 49
50 class BASE_API JSONReader { 50 class BASE_EXPORT JSONReader {
51 public: 51 public:
52 // A struct to hold a JS token. 52 // A struct to hold a JS token.
53 class Token { 53 class Token {
54 public: 54 public:
55 enum Type { 55 enum Type {
56 OBJECT_BEGIN, // { 56 OBJECT_BEGIN, // {
57 OBJECT_END, // } 57 OBJECT_END, // }
58 ARRAY_BEGIN, // [ 58 ARRAY_BEGIN, // [
59 ARRAY_END, // ] 59 ARRAY_END, // ]
60 STRING, 60 STRING,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 JsonParseError error_code_; 212 JsonParseError error_code_;
213 int error_line_; 213 int error_line_;
214 int error_col_; 214 int error_col_;
215 215
216 DISALLOW_COPY_AND_ASSIGN(JSONReader); 216 DISALLOW_COPY_AND_ASSIGN(JSONReader);
217 }; 217 };
218 218
219 } // namespace base 219 } // namespace base
220 220
221 #endif // BASE_JSON_JSON_READER_H_ 221 #endif // BASE_JSON_JSON_READER_H_
OLDNEW
« no previous file with comments | « base/global_descriptors_posix.h ('k') | base/json/json_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698