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

Side by Side Diff: chrome/common/ini_parser.cc

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « chrome/common/ini_parser.h ('k') | chrome/common/ini_parser_unittest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/common/ini_parser.h" 5 #include "chrome/common/ini_parser.h"
6 6
7 #include <stddef.h>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "base/strings/string_tokenizer.h" 10 #include "base/strings/string_tokenizer.h"
9 11
10 INIParser::INIParser() : used_(false) {} 12 INIParser::INIParser() : used_(false) {}
11 13
12 INIParser::~INIParser() {} 14 INIParser::~INIParser() {}
13 15
14 void INIParser::Parse(const std::string& content) { 16 void INIParser::Parse(const std::string& content) {
15 DCHECK(!used_); 17 DCHECK(!used_);
16 used_ = true; 18 used_ = true;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 const std::string& key, 55 const std::string& key,
54 const std::string& value) { 56 const std::string& value) {
55 57
56 // Checks whether the section and key contain a '.' character. 58 // Checks whether the section and key contain a '.' character.
57 // Those sections and keys break DictionaryValue's path format when not 59 // Those sections and keys break DictionaryValue's path format when not
58 // using the *WithoutPathExpansion methods. 60 // using the *WithoutPathExpansion methods.
59 if (section.find('.') == std::string::npos && 61 if (section.find('.') == std::string::npos &&
60 key.find('.') == std::string::npos) 62 key.find('.') == std::string::npos)
61 root_.SetString(section + "." + key, value); 63 root_.SetString(section + "." + key, value);
62 } 64 }
OLDNEW
« no previous file with comments | « chrome/common/ini_parser.h ('k') | chrome/common/ini_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698