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

Unified Diff: services/log/main.cc

Issue 1928613002: Simplify LogImpl a bit. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/log/log_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/log/main.cc
diff --git a/services/log/main.cc b/services/log/main.cc
index 5805c55b9f94b46d32c20a6e16476a7b173bc4f3..23b8579e667d4d37ca6de4b17bde1a5f59b3a02c 100644
--- a/services/log/main.cc
+++ b/services/log/main.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdio.h>
+
#include <utility>
#include "mojo/application/application_runner_chromium.h"
@@ -34,7 +36,10 @@ class LogApp : public ApplicationDelegate, public InterfaceFactory<Log> {
// We maintain a separate |LogImpl| for each incoming connection.
void Create(ApplicationConnection* connection,
InterfaceRequest<Log> request) override {
- LogImpl::Create(connection, std::move(request), stderr);
+ LogImpl::Create(connection, std::move(request),
+ [](const std::string& message) {
+ fprintf(stderr, "%s\n", message.c_str());
+ });
}
MOJO_DISALLOW_COPY_AND_ASSIGN(LogApp);
« no previous file with comments | « services/log/log_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698