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

Side by Side Diff: chrome/browser/extensions/api/log_private/log_parser.cc

Issue 1240183002: Update SplitString calls in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/extensions/api/log_private/log_parser.h" 5 #include "chrome/browser/extensions/api/log_private/log_parser.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 10 matching lines...) Expand all
21 LogParser::LogParser() { 21 LogParser::LogParser() {
22 } 22 }
23 23
24 LogParser::~LogParser() { 24 LogParser::~LogParser() {
25 } 25 }
26 26
27 void LogParser::Parse( 27 void LogParser::Parse(
28 const string& input, 28 const string& input,
29 std::vector<linked_ptr<api::log_private::LogEntry> >* output, 29 std::vector<linked_ptr<api::log_private::LogEntry> >* output,
30 FilterHandler* filter_handler) const { 30 FilterHandler* filter_handler) const {
31 std::vector<string> entries;
32 // Assume there is no newline in the log entry 31 // Assume there is no newline in the log entry
33 base::SplitString(input, '\n', &entries); 32 std::vector<string> entries = base::SplitString(
33 input, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
34 34
35 for (size_t i = 0; i < entries.size(); i++) { 35 for (size_t i = 0; i < entries.size(); i++) {
36 ParseEntry(entries[i], output, filter_handler); 36 ParseEntry(entries[i], output, filter_handler);
37 } 37 }
38 } 38 }
39 39
40 } // namespace extensions 40 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc ('k') | chrome/browser/extensions/extension_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698