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

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

Issue 316016: Move the json-related files into a separate json directory. This hopefully al... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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_reader.h ('k') | base/json/json_reader_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/base/json_reader.cc:r69-2775
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_reader.h" 5 #include "base/json/json_reader.h"
6 6
7 #include "base/float_util.h" 7 #include "base/float_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 13
14 namespace base {
15
14 static const JSONReader::Token kInvalidToken(JSONReader::Token::INVALID_TOKEN, 16 static const JSONReader::Token kInvalidToken(JSONReader::Token::INVALID_TOKEN,
15 0, 0); 17 0, 0);
16 static const int kStackLimit = 100; 18 static const int kStackLimit = 100;
17 19
18 namespace { 20 namespace {
19 21
20 inline int HexToInt(wchar_t c) { 22 inline int HexToInt(wchar_t c) {
21 if ('0' <= c && c <= '9') { 23 if ('0' <= c && c <= '9') {
22 return c - '0'; 24 return c - '0';
23 } else if ('A' <= c && c <= 'F') { 25 } else if ('A' <= c && c <= 'F') {
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 if (*pos == '\n') { 631 if (*pos == '\n') {
630 ++line_number; 632 ++line_number;
631 column_number = 1; 633 column_number = 1;
632 } else { 634 } else {
633 ++column_number; 635 ++column_number;
634 } 636 }
635 } 637 }
636 638
637 error_message_ = FormatErrorMessage(line_number, column_number, description); 639 error_message_ = FormatErrorMessage(line_number, column_number, description);
638 } 640 }
641
642 } // namespace base
OLDNEW
« no previous file with comments | « base/json/json_reader.h ('k') | base/json/json_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698