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

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

Issue 2934163002: Delete the logPrivate APIs (Closed)
Patch Set: Roll back docs changes Created 3 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/extensions/api/log_private/log_parser.h"
6
7 #include <stddef.h>
8
9 #include <string>
10 #include <vector>
11
12 #include "base/logging.h"
13 #include "base/strings/string_split.h"
14 #include "chrome/browser/extensions/api/log_private/log_private_api.h"
15 #include "chrome/common/extensions/api/log_private.h"
16
17 using std::string;
18 using std::vector;
19
20 namespace extensions {
21
22 LogParser::LogParser() {
23 }
24
25 LogParser::~LogParser() {
26 }
27
28 void LogParser::Parse(const string& input,
29 std::vector<api::log_private::LogEntry>* output,
30 FilterHandler* filter_handler) const {
31 // Assume there is no newline in the log entry
32 std::vector<string> entries = base::SplitString(
33 input, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
34
35 for (size_t i = 0; i < entries.size(); i++) {
36 ParseEntry(entries[i], output, filter_handler);
37 }
38 }
39
40 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/log_private/log_parser.h ('k') | chrome/browser/extensions/api/log_private/log_private_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698