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

Unified Diff: remoting/client/plugin/chromoting_instance.cc

Issue 19579010: Remove unnecessary SupportsWeakPtr base from ChromotingInstance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/plugin/chromoting_instance.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/chromoting_instance.cc
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index edf2c1dae9666fa0f222b199c1fd7d601fd969a8..8be169c9d227874a17b053e262cd7db27e4054d5 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -294,7 +294,7 @@ void ChromotingInstance::HandleMessage(const pp::Var& message) {
if (use_async_pin_dialog_) {
config.fetch_secret_callback =
base::Bind(&ChromotingInstance::FetchSecretFromDialog,
- this->AsWeakPtr());
+ weak_factory_.GetWeakPtr());
} else {
std::string shared_secret;
if (!data->GetString("sharedSecret", &shared_secret)) {
@@ -572,7 +572,7 @@ protocol::CursorShapeStub* ChromotingInstance::GetCursorShapeStub() {
scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher>
ChromotingInstance::GetTokenFetcher(const std::string& host_public_key) {
return scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher>(
- new PepperTokenFetcher(this->AsWeakPtr(), host_public_key));
+ new PepperTokenFetcher(weak_factory_.GetWeakPtr(), host_public_key));
}
void ChromotingInstance::InjectClipboardEvent(
@@ -701,7 +701,8 @@ void ChromotingInstance::Connect(const ClientConfig& config) {
// Setup the PepperSignalStrategy.
signal_strategy_.reset(new PepperSignalStrategy(
config.local_jid,
- base::Bind(&ChromotingInstance::SendOutgoingIq, AsWeakPtr())));
+ base::Bind(&ChromotingInstance::SendOutgoingIq,
+ weak_factory_.GetWeakPtr())));
scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator(
PepperPortAllocator::Create(this));
@@ -713,7 +714,8 @@ void ChromotingInstance::Connect(const ClientConfig& config) {
// Start timer that periodically sends perf stats.
plugin_task_runner_->PostDelayedTask(
- FROM_HERE, base::Bind(&ChromotingInstance::SendPerfStats, AsWeakPtr()),
+ FROM_HERE, base::Bind(&ChromotingInstance::SendPerfStats,
+ weak_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs));
}
@@ -874,7 +876,8 @@ void ChromotingInstance::SendPerfStats() {
}
plugin_task_runner_->PostDelayedTask(
- FROM_HERE, base::Bind(&ChromotingInstance::SendPerfStats, AsWeakPtr()),
+ FROM_HERE, base::Bind(&ChromotingInstance::SendPerfStats,
+ weak_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs));
scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue());
« no previous file with comments | « remoting/client/plugin/chromoting_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698