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

Side by Side Diff: base/string_split.cc

Issue 3119022: Header cleanup in base.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/string_split.h" 5 #include "base/string_split.h"
6 6
7 #include "base/logging.h"
7 #include "base/string_util.h" 8 #include "base/string_util.h"
8 9
9 namespace base { 10 namespace base {
10 11
11 bool SplitStringIntoKeyValues( 12 bool SplitStringIntoKeyValues(
12 const std::string& line, 13 const std::string& line,
13 char key_value_delimiter, 14 char key_value_delimiter,
14 std::string* key, std::vector<std::string>* values) { 15 std::string* key, std::vector<std::string>* values) {
15 key->clear(); 16 key->clear();
16 values->clear(); 17 values->clear();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // values; just record that our split failed. 65 // values; just record that our split failed.
65 success = false; 66 success = false;
66 } 67 }
67 DCHECK_LE(value.size(), 1U); 68 DCHECK_LE(value.size(), 1U);
68 kv_pairs->push_back(make_pair(key, value.empty()? "" : value[0])); 69 kv_pairs->push_back(make_pair(key, value.empty()? "" : value[0]));
69 } 70 }
70 return success; 71 return success;
71 } 72 }
72 73
73 } // namespace base 74 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698