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

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

Issue 8970002: Revert 114680 - Remove FRIEND_TEST declarations to improve optimizations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 | « no previous file | no next file » | 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 19 matching lines...) Expand all
30 #pragma once 30 #pragma once
31 31
32 #include <string> 32 #include <string>
33 33
34 #include "base/base_export.h" 34 #include "base/base_export.h"
35 #include "base/basictypes.h" 35 #include "base/basictypes.h"
36 36
37 // Chromium and Chromium OS check out gtest to different places, so we're 37 // Chromium and Chromium OS check out gtest to different places, so we're
38 // unable to compile on both if we include gtest_prod.h here. Instead, include 38 // unable to compile on both if we include gtest_prod.h here. Instead, include
39 // its only contents -- this will need to be updated if the macro ever changes. 39 // its only contents -- this will need to be updated if the macro ever changes.
40 #if defined(GOOGLE_CHROME_BUILD) 40 #define FRIEND_TEST(test_case_name, test_name)\
41 41 friend class test_case_name##_##test_name##_Test
42 // Provide a no-op that can live in a class definition.
43 // We can't use an expression, so we define a useless local class name.
44 #define FRIEND_TEST(test_case_name, test_name) \
45 class test_case_name##_##test_name##_Test {int garbage;}
46
47 #else
48
49 #define FRIEND_TEST(test_case_name, test_name) \
50 friend class test_case_name##_##test_name##_Test
51
52 #endif
53 42
54 #define FRIEND_TEST_ALL_PREFIXES(test_case_name, test_name) \ 43 #define FRIEND_TEST_ALL_PREFIXES(test_case_name, test_name) \
55 FRIEND_TEST(test_case_name, test_name); \ 44 FRIEND_TEST(test_case_name, test_name); \
56 FRIEND_TEST(test_case_name, DISABLED_##test_name); \ 45 FRIEND_TEST(test_case_name, DISABLED_##test_name); \
57 FRIEND_TEST(test_case_name, FLAKY_##test_name); \ 46 FRIEND_TEST(test_case_name, FLAKY_##test_name); \
58 FRIEND_TEST(test_case_name, FAILS_##test_name) 47 FRIEND_TEST(test_case_name, FAILS_##test_name)
59 48
60 namespace base { 49 namespace base {
61 50
62 class Value; 51 class Value;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 JsonParseError error_code_; 220 JsonParseError error_code_;
232 int error_line_; 221 int error_line_;
233 int error_col_; 222 int error_col_;
234 223
235 DISALLOW_COPY_AND_ASSIGN(JSONReader); 224 DISALLOW_COPY_AND_ASSIGN(JSONReader);
236 }; 225 };
237 226
238 } // namespace base 227 } // namespace base
239 228
240 #endif // BASE_JSON_JSON_READER_H_ 229 #endif // BASE_JSON_JSON_READER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698