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

Unified Diff: components/sync/driver/glue/sync_backend_host_impl.cc

Issue 2283373002: Remove unneeded scoped_refptr<>::get() on method binding (Closed)
Patch Set: Created 4 years, 4 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: components/sync/driver/glue/sync_backend_host_impl.cc
diff --git a/components/sync/driver/glue/sync_backend_host_impl.cc b/components/sync/driver/glue/sync_backend_host_impl.cc
index 122d4803dbe7924eb11aac70fbcf42314a0078e6..496c999fe40b48040ccd777932daa47b7bb473bd 100644
--- a/components/sync/driver/glue/sync_backend_host_impl.cc
+++ b/components/sync/driver/glue/sync_backend_host_impl.cc
@@ -138,7 +138,7 @@ void SyncBackendHostImpl::TriggerRefresh(const syncer::ModelTypeSet& types) {
DCHECK(ui_thread_->BelongsToCurrentThread());
registrar_->sync_thread()->task_runner()->PostTask(
FROM_HERE,
- base::Bind(&SyncBackendHostCore::DoRefreshTypes, core_.get(), types));
+ base::Bind(&SyncBackendHostCore::DoRefreshTypes, core_, types));
}
void SyncBackendHostImpl::UpdateCredentials(
@@ -146,7 +146,7 @@ void SyncBackendHostImpl::UpdateCredentials(
DCHECK(registrar_->sync_thread()->IsRunning());
registrar_->sync_thread()->task_runner()->PostTask(
FROM_HERE, base::Bind(&SyncBackendHostCore::DoUpdateCredentials,
- core_.get(), credentials));
+ core_, credentials));
}
void SyncBackendHostImpl::StartSyncingWithServer() {
@@ -156,7 +156,7 @@ void SyncBackendHostImpl::StartSyncingWithServer() {
registrar_->GetModelSafeRoutingInfo(&routing_info);
registrar_->sync_thread()->task_runner()->PostTask(
- FROM_HERE, base::Bind(&SyncBackendHostCore::DoStartSyncing, core_.get(),
+ FROM_HERE, base::Bind(&SyncBackendHostCore::DoStartSyncing, core_,
routing_info, sync_prefs_->GetLastPollTime()));
}
@@ -183,7 +183,7 @@ void SyncBackendHostImpl::SetEncryptionPassphrase(const std::string& passphrase,
// Post an encryption task on the syncer thread.
registrar_->sync_thread()->task_runner()->PostTask(
FROM_HERE, base::Bind(&SyncBackendHostCore::DoSetEncryptionPassphrase,
- core_.get(), passphrase, is_explicit));
+ core_, passphrase, is_explicit));
}
bool SyncBackendHostImpl::SetDecryptionPassphrase(
@@ -212,7 +212,7 @@ bool SyncBackendHostImpl::SetDecryptionPassphrase(
// Post a decryption task on the syncer thread.
registrar_->sync_thread()->task_runner()->PostTask(
FROM_HERE, base::Bind(&SyncBackendHostCore::DoSetDecryptionPassphrase,
- core_.get(), passphrase));
+ core_, passphrase));
// Since we were able to decrypt the cached pending keys with the passphrase
// provided, we immediately alert the UI layer that the passphrase was
@@ -263,7 +263,7 @@ std::unique_ptr<base::Thread> SyncBackendHostImpl::Shutdown(
// Shut down and destroy sync manager.
registrar_->sync_thread()->task_runner()->PostTask(
FROM_HERE,
- base::Bind(&SyncBackendHostCore::DoShutdown, core_.get(), reason));
+ base::Bind(&SyncBackendHostCore::DoShutdown, core_, reason));
core_ = NULL;
// Worker cleanup.
@@ -409,7 +409,7 @@ syncer::ModelTypeSet SyncBackendHostImpl::ConfigureDataTypes(
void SyncBackendHostImpl::EnableEncryptEverything() {
registrar_->sync_thread()->task_runner()->PostTask(
FROM_HERE,
- base::Bind(&SyncBackendHostCore::DoEnableEncryptEverything, core_.get()));
+ base::Bind(&SyncBackendHostCore::DoEnableEncryptEverything, core_));
}
void SyncBackendHostImpl::ActivateDirectoryDataType(
@@ -532,7 +532,7 @@ void SyncBackendHostImpl::GetAllNodesForTypes(
void SyncBackendHostImpl::InitCore(
std::unique_ptr<DoInitializeOptions> options) {
registrar_->sync_thread()->task_runner()->PostTask(
- FROM_HERE, base::Bind(&SyncBackendHostCore::DoInitialize, core_.get(),
+ FROM_HERE, base::Bind(&SyncBackendHostCore::DoInitialize, core_,
base::Passed(&options)));
}
@@ -554,7 +554,7 @@ void SyncBackendHostImpl::RequestConfigureSyncer(
config_types.to_unapply = to_unapply;
registrar_->sync_thread()->task_runner()->PostTask(
FROM_HERE,
- base::Bind(&SyncBackendHostCore::DoConfigureSyncer, core_.get(), reason,
+ base::Bind(&SyncBackendHostCore::DoConfigureSyncer, core_, reason,
config_types, routing_info, ready_task, retry_callback));
}
@@ -683,14 +683,14 @@ void SyncBackendHostImpl::OnInvalidatorStateChange(
syncer::InvalidatorState state) {
registrar_->sync_thread()->task_runner()->PostTask(
FROM_HERE, base::Bind(&SyncBackendHostCore::DoOnInvalidatorStateChange,
- core_.get(), state));
+ core_, state));
}
void SyncBackendHostImpl::OnIncomingInvalidation(
const syncer::ObjectIdInvalidationMap& invalidation_map) {
registrar_->sync_thread()->task_runner()->PostTask(
FROM_HERE, base::Bind(&SyncBackendHostCore::DoOnIncomingInvalidation,
- core_.get(), invalidation_map));
+ core_, invalidation_map));
}
std::string SyncBackendHostImpl::GetOwnerName() const {
@@ -826,7 +826,7 @@ void SyncBackendHostImpl::RefreshTypesForTest(syncer::ModelTypeSet types) {
registrar_->sync_thread()->task_runner()->PostTask(
FROM_HERE,
- base::Bind(&SyncBackendHostCore::DoRefreshTypes, core_.get(), types));
+ base::Bind(&SyncBackendHostCore::DoRefreshTypes, core_, types));
}
void SyncBackendHostImpl::ClearServerData(
@@ -834,7 +834,7 @@ void SyncBackendHostImpl::ClearServerData(
DCHECK(ui_thread_->BelongsToCurrentThread());
registrar_->sync_thread()->task_runner()->PostTask(
FROM_HERE, base::Bind(&SyncBackendHostCore::DoClearServerData,
- core_.get(), callback));
+ core_, callback));
}
void SyncBackendHostImpl::OnCookieJarChanged(bool account_mismatch,
@@ -842,7 +842,7 @@ void SyncBackendHostImpl::OnCookieJarChanged(bool account_mismatch,
DCHECK(ui_thread_->BelongsToCurrentThread());
registrar_->sync_thread()->task_runner()->PostTask(
FROM_HERE, base::Bind(&SyncBackendHostCore::DoOnCookieJarChanged,
- core_.get(), account_mismatch, empty_jar));
+ core_, account_mismatch, empty_jar));
}
void SyncBackendHostImpl::ClearServerDataDoneOnFrontendLoop(

Powered by Google App Engine
This is Rietveld 408576698