Commit e5d9939e authored by Yuwei Huang's avatar Yuwei Huang Committed by Commit Bot

[Remoting Mobile] Remove unused weak_ptr from ChromotingSession

The weak_ptr_ in ChromotingSession seems to be unused. This CL removes
it.

Bug: 817566
Change-Id: I4f07be8e8047b76ce36f5fe658b17bf6cf45ec72
Reviewed-on: https://chromium-review.googlesource.com/974563Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544956}
parent 1986382b
...@@ -526,8 +526,7 @@ ChromotingSession::ChromotingSession( ...@@ -526,8 +526,7 @@ ChromotingSession::ChromotingSession(
std::unique_ptr<protocol::VideoRenderer> video_renderer, std::unique_ptr<protocol::VideoRenderer> video_renderer,
base::WeakPtr<protocol::AudioStub> audio_player, base::WeakPtr<protocol::AudioStub> audio_player,
const ConnectToHostInfo& info, const ConnectToHostInfo& info,
const protocol::ClientAuthenticationConfig& client_auth_config) const protocol::ClientAuthenticationConfig& client_auth_config) {
: weak_factory_(this) {
DCHECK(delegate); DCHECK(delegate);
DCHECK(cursor_shape_stub); DCHECK(cursor_shape_stub);
DCHECK(video_renderer); DCHECK(video_renderer);
...@@ -535,7 +534,6 @@ ChromotingSession::ChromotingSession( ...@@ -535,7 +534,6 @@ ChromotingSession::ChromotingSession(
runtime_ = ChromotingClientRuntime::GetInstance(); runtime_ = ChromotingClientRuntime::GetInstance();
DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread()); DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread());
weak_ptr_ = weak_factory_.GetWeakPtr();
logger_ = std::make_unique<ClientTelemetryLogger>( logger_ = std::make_unique<ClientTelemetryLogger>(
runtime_->log_writer(), ChromotingEvent::Mode::ME2ME); runtime_->log_writer(), ChromotingEvent::Mode::ME2ME);
......
...@@ -160,10 +160,6 @@ class ChromotingSession : public ClientInputInjector { ...@@ -160,10 +160,6 @@ class ChromotingSession : public ClientInputInjector {
// |core_| to allow accessing logs after |core_| becomes invalid. // |core_| to allow accessing logs after |core_| becomes invalid.
std::unique_ptr<ClientTelemetryLogger> logger_; std::unique_ptr<ClientTelemetryLogger> logger_;
// This is bound to UI thread.
base::WeakPtr<ChromotingSession> weak_ptr_;
base::WeakPtrFactory<ChromotingSession> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(ChromotingSession); DISALLOW_COPY_AND_ASSIGN(ChromotingSession);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment