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

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

Issue 9854040: Fix some grammatical errors in base/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove the incorrect fix I made (three out of four ain't bad?) Created 8 years, 8 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 | « no previous file | base/process_util_linux.cc » ('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 #include "base/json/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/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 case 'u': 491 case 'u':
492 decoded_str.push_back((HexDigitToInt(*(token.begin + i + 1)) << 12 ) + 492 decoded_str.push_back((HexDigitToInt(*(token.begin + i + 1)) << 12 ) +
493 (HexDigitToInt(*(token.begin + i + 2)) << 8) + 493 (HexDigitToInt(*(token.begin + i + 2)) << 8) +
494 (HexDigitToInt(*(token.begin + i + 3)) << 4) + 494 (HexDigitToInt(*(token.begin + i + 3)) << 4) +
495 HexDigitToInt(*(token.begin + i + 4))); 495 HexDigitToInt(*(token.begin + i + 4)));
496 i += 4; 496 i += 4;
497 break; 497 break;
498 498
499 default: 499 default:
500 // We should only have valid strings at this point. If not, 500 // We should only have valid strings at this point. If not,
501 // ParseStringToken didn't do it's job. 501 // ParseStringToken didn't do its job.
502 NOTREACHED(); 502 NOTREACHED();
503 return NULL; 503 return NULL;
504 } 504 }
505 } else { 505 } else {
506 // Not escaped 506 // Not escaped
507 decoded_str.push_back(c); 507 decoded_str.push_back(c);
508 } 508 }
509 } 509 }
510 return Value::CreateStringValue(WideToUTF16Hack(decoded_str)); 510 return Value::CreateStringValue(WideToUTF16Hack(decoded_str));
511 } 511 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 ++column_number; 657 ++column_number;
658 } 658 }
659 } 659 }
660 660
661 error_line_ = line_number; 661 error_line_ = line_number;
662 error_col_ = column_number; 662 error_col_ = column_number;
663 error_code_ = error; 663 error_code_ = error;
664 } 664 }
665 665
666 } // namespace base 666 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/process_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698