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

Unified Diff: mojo/services/flog/cpp/flog.h

Issue 2046703002: Add 'flog' service implementation. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: mojo/services/flog/cpp/flog.h
diff --git a/mojo/services/flog/cpp/flog.h b/mojo/services/flog/cpp/flog.h
index dfa9e3bdeca2f20a5b7f1233cc688c6b84b72661..4ab91b4e07a6a92a87480aa3c0e64f57e805dfe5 100644
--- a/mojo/services/flog/cpp/flog.h
+++ b/mojo/services/flog/cpp/flog.h
@@ -95,11 +95,11 @@ namespace flog {
// Thread-safe logger for all channels in a given process.
class Flog {
public:
- static void Initialize(ApplicationImpl* app, const std::string& label) {
+ static void Initialize(Shell* shell, const std::string& label) {
MOJO_DCHECK(!logger_);
FlogServicePtr flog_service;
FlogLoggerPtr flog_logger;
- ConnectToService(app->shell(), "mojo:flog", GetProxy(&flog_service));
+ ConnectToService(shell, "mojo:flog", GetProxy(&flog_service));
flog_service->CreateLogger(GetProxy(&flog_logger), label);
logger_ = flog_logger.Pass();
}
@@ -150,6 +150,8 @@ class Flog {
logger_->LogChannelDeletion(GetTimeTicksNow(), channel_id);
}
+ // TODO(dalesat): Add method for text/file/line
+
private:
static std::atomic_ulong last_allocated_channel_id_;
static FlogLoggerPtr logger_;

Powered by Google App Engine
This is Rietveld 408576698