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

Unified Diff: remoting/client/jni/chromoting_jni_runtime.h

Issue 2643483003: [Remoting Android] Refactor ClientTelemetryLogger (Closed)
Patch Set: PTAL Created 3 years, 11 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 | « remoting/client/jni/chromoting_jni_instance.cc ('k') | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/jni/chromoting_jni_runtime.h
diff --git a/remoting/client/jni/chromoting_jni_runtime.h b/remoting/client/jni/chromoting_jni_runtime.h
index dca16318a6ef3abc1f02fb66923356a81dce174b..61a2fe7c394261ca7e7730a12fa6f81a22751250 100644
--- a/remoting/client/jni/chromoting_jni_runtime.h
+++ b/remoting/client/jni/chromoting_jni_runtime.h
@@ -12,8 +12,8 @@
#include "base/macros.h"
#include "net/url_request/url_request_context_getter.h"
#include "remoting/base/auto_thread.h"
+#include "remoting/base/telemetry_log_writer.h"
#include "remoting/client/chromoting_client_runtime.h"
-#include "remoting/client/client_telemetry_logger.h"
#include "remoting/client/jni/chromoting_jni_instance.h"
#include "remoting/protocol/connection_to_host.h"
@@ -51,13 +51,11 @@ class ChromotingJniRuntime {
return runtime_->url_requester();
}
- // The runtime handles authentication and the caller should not call SetAuth*.
- // The runtime itself will not send out any logs. Used on the network thread.
- ClientTelemetryLogger* logger() {
- DCHECK(runtime_->network_task_runner()->BelongsToCurrentThread());
- DCHECK(logger_);
- return logger_.get();
- }
+ // Returns the log writer that can be used by ClientTelemetryLogger to send
+ // out logs.
+ // Method must be called and returned object must be used on the network
+ // thread.
+ TelemetryLogWriter* GetLogWriter();
// Fetch OAuth token for the telemetry logger. Call on UI thread.
void FetchAuthToken();
@@ -87,7 +85,7 @@ class ChromotingJniRuntime {
std::unique_ptr<ChromotingClientRuntime> runtime_;
// For logging session stage changes and stats.
- std::unique_ptr<ClientTelemetryLogger> logger_;
+ std::unique_ptr<TelemetryLogWriter> log_writer_;
friend struct base::DefaultSingletonTraits<ChromotingJniRuntime>;
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.cc ('k') | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698