summaryrefslogtreecommitdiffstats
path: root/sync
diff options
context:
space:
mode:
authorDaniel Cheng <dcheng@chromium.org>2014-08-25 17:25:37 -0700
committerDaniel Cheng <dcheng@chromium.org>2014-08-26 00:30:26 +0000
commit12c173d02d9306bdd180a4535d55aabf581b4c33 (patch)
treedb1e13247b7b7f47fe654f8a8cb57abcf105ce22 /sync
parent7927079955d2767e1fa812fe58432fcb9d6250aa (diff)
downloadchromium_src-12c173d02d9306bdd180a4535d55aabf581b4c33.zip
chromium_src-12c173d02d9306bdd180a4535d55aabf581b4c33.tar.gz
chromium_src-12c173d02d9306bdd180a4535d55aabf581b4c33.tar.bz2
Remove implicit conversions from scoped_refptr to T* in sync/
This patch was generated by running the rewrite_scoped_refptr clang tool on a Linux build. BUG=110610 R=rlarocque@chromium.org Review URL: https://codereview.chromium.org/503903002 Cr-Commit-Position: refs/heads/master@{#291804}
Diffstat (limited to 'sync')
-rw-r--r--sync/api/attachments/attachment.cc2
-rw-r--r--sync/engine/syncer_unittest.cc19
-rw-r--r--sync/internal_api/attachments/attachment_downloader_impl.cc4
-rw-r--r--sync/internal_api/attachments/attachment_service_proxy.cc12
-rw-r--r--sync/internal_api/attachments/attachment_service_proxy_for_test.cc2
-rw-r--r--sync/internal_api/attachments/attachment_uploader_impl.cc4
-rw-r--r--sync/internal_api/http_bridge.cc5
-rw-r--r--sync/internal_api/http_bridge_unittest.cc8
8 files changed, 28 insertions, 28 deletions
diff --git a/sync/api/attachments/attachment.cc b/sync/api/attachments/attachment.cc
index b5cfe5d..3a4dfc3 100644
--- a/sync/api/attachments/attachment.cc
+++ b/sync/api/attachments/attachment.cc
@@ -32,7 +32,7 @@ const scoped_refptr<base::RefCountedMemory>& Attachment::GetData() const {
Attachment::Attachment(const AttachmentId& id,
const scoped_refptr<base::RefCountedMemory>& data)
: id_(id), data_(data) {
- DCHECK(data);
+ DCHECK(data.get());
}
} // namespace syncer
diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc
index 77bc288..9995c1a 100644
--- a/sync/engine/syncer_unittest.cc
+++ b/sync/engine/syncer_unittest.cc
@@ -306,15 +306,16 @@ class SyncerTest : public testing::Test,
model_type_registry_->RegisterDirectoryTypeDebugInfoObserver(
&debug_info_cache_);
- context_.reset(
- new SyncSessionContext(
- mock_server_.get(), directory(),
- extensions_activity_,
- listeners, debug_info_getter_.get(),
- model_type_registry_.get(),
- true, // enable keystore encryption
- false, // force enable pre-commit GU avoidance experiment
- "fake_invalidator_client_id"));
+ context_.reset(new SyncSessionContext(
+ mock_server_.get(),
+ directory(),
+ extensions_activity_.get(),
+ listeners,
+ debug_info_getter_.get(),
+ model_type_registry_.get(),
+ true, // enable keystore encryption
+ false, // force enable pre-commit GU avoidance experiment
+ "fake_invalidator_client_id"));
context_->SetRoutingInfo(routing_info);
syncer_ = new Syncer(&cancelation_signal_);
diff --git a/sync/internal_api/attachments/attachment_downloader_impl.cc b/sync/internal_api/attachments/attachment_downloader_impl.cc
index ab34c83..d43b3ea 100644
--- a/sync/internal_api/attachments/attachment_downloader_impl.cc
+++ b/sync/internal_api/attachments/attachment_downloader_impl.cc
@@ -51,8 +51,8 @@ AttachmentDownloaderImpl::AttachmentDownloaderImpl(
token_service_provider_(token_service_provider) {
DCHECK(!account_id.empty());
DCHECK(!scopes.empty());
- DCHECK(token_service_provider_);
- DCHECK(url_request_context_getter_);
+ DCHECK(token_service_provider_.get());
+ DCHECK(url_request_context_getter_.get());
}
AttachmentDownloaderImpl::~AttachmentDownloaderImpl() {
diff --git a/sync/internal_api/attachments/attachment_service_proxy.cc b/sync/internal_api/attachments/attachment_service_proxy.cc
index 9f408b2..1d41878 100644
--- a/sync/internal_api/attachments/attachment_service_proxy.cc
+++ b/sync/internal_api/attachments/attachment_service_proxy.cc
@@ -53,15 +53,15 @@ AttachmentServiceProxy::AttachmentServiceProxy(
const scoped_refptr<base::SequencedTaskRunner>& wrapped_task_runner,
const base::WeakPtr<syncer::AttachmentService>& wrapped)
: wrapped_task_runner_(wrapped_task_runner), core_(new Core(wrapped)) {
- DCHECK(wrapped_task_runner_);
+ DCHECK(wrapped_task_runner_.get());
}
AttachmentServiceProxy::AttachmentServiceProxy(
const scoped_refptr<base::SequencedTaskRunner>& wrapped_task_runner,
const scoped_refptr<Core>& core)
: wrapped_task_runner_(wrapped_task_runner), core_(core) {
- DCHECK(wrapped_task_runner_);
- DCHECK(core_);
+ DCHECK(wrapped_task_runner_.get());
+ DCHECK(core_.get());
}
AttachmentServiceProxy::~AttachmentServiceProxy() {
@@ -70,7 +70,7 @@ AttachmentServiceProxy::~AttachmentServiceProxy() {
void AttachmentServiceProxy::GetOrDownloadAttachments(
const AttachmentIdList& attachment_ids,
const GetOrDownloadCallback& callback) {
- DCHECK(wrapped_task_runner_);
+ DCHECK(wrapped_task_runner_.get());
GetOrDownloadCallback proxy_callback =
base::Bind(&ProxyGetOrDownloadCallback,
base::ThreadTaskRunnerHandle::Get(),
@@ -86,7 +86,7 @@ void AttachmentServiceProxy::GetOrDownloadAttachments(
void AttachmentServiceProxy::DropAttachments(
const AttachmentIdList& attachment_ids,
const DropCallback& callback) {
- DCHECK(wrapped_task_runner_);
+ DCHECK(wrapped_task_runner_.get());
DropCallback proxy_callback = base::Bind(
&ProxyDropCallback, base::ThreadTaskRunnerHandle::Get(), callback);
wrapped_task_runner_->PostTask(FROM_HERE,
@@ -98,7 +98,7 @@ void AttachmentServiceProxy::DropAttachments(
void AttachmentServiceProxy::StoreAttachments(const AttachmentList& attachments,
const StoreCallback& callback) {
- DCHECK(wrapped_task_runner_);
+ DCHECK(wrapped_task_runner_.get());
StoreCallback proxy_callback = base::Bind(
&ProxyStoreCallback, base::ThreadTaskRunnerHandle::Get(), callback);
wrapped_task_runner_->PostTask(
diff --git a/sync/internal_api/attachments/attachment_service_proxy_for_test.cc b/sync/internal_api/attachments/attachment_service_proxy_for_test.cc
index 2ab8dce..53f7d60 100644
--- a/sync/internal_api/attachments/attachment_service_proxy_for_test.cc
+++ b/sync/internal_api/attachments/attachment_service_proxy_for_test.cc
@@ -40,7 +40,7 @@ AttachmentServiceProxy AttachmentServiceProxyForTest::Create() {
scoped_refptr<base::SequencedTaskRunner> runner(
base::ThreadTaskRunnerHandle::Get());
- if (!runner) {
+ if (!runner.get()) {
// Dummy runner for tests that don't care about AttachmentServiceProxy.
DVLOG(1) << "Creating dummy MessageLoop for AttachmentServiceProxy.";
base::MessageLoop loop;
diff --git a/sync/internal_api/attachments/attachment_uploader_impl.cc b/sync/internal_api/attachments/attachment_uploader_impl.cc
index a6614ef..4d197eb 100644
--- a/sync/internal_api/attachments/attachment_uploader_impl.cc
+++ b/sync/internal_api/attachments/attachment_uploader_impl.cc
@@ -108,7 +108,7 @@ AttachmentUploaderImpl::UploadState::UploadState(
token_service_provider_(token_service_provider),
owner_(owner) {
DCHECK(upload_url_.is_valid());
- DCHECK(url_request_context_getter_);
+ DCHECK(url_request_context_getter_.get());
DCHECK(!account_id_.empty());
DCHECK(!scopes_.empty());
DCHECK(token_service_provider_);
@@ -222,7 +222,7 @@ AttachmentUploaderImpl::AttachmentUploaderImpl(
DCHECK(CalledOnValidThread());
DCHECK(!account_id.empty());
DCHECK(!scopes.empty());
- DCHECK(token_service_provider_);
+ DCHECK(token_service_provider_.get());
}
AttachmentUploaderImpl::~AttachmentUploaderImpl() {
diff --git a/sync/internal_api/http_bridge.cc b/sync/internal_api/http_bridge.cc
index 6c1c085..96edb62 100644
--- a/sync/internal_api/http_bridge.cc
+++ b/sync/internal_api/http_bridge.cc
@@ -82,9 +82,8 @@ void HttpBridgeFactory::Init(const std::string& user_agent) {
return;
}
- request_context_getter_ =
- new HttpBridge::RequestContextGetter(
- baseline_request_context_getter_, user_agent);
+ request_context_getter_ = new HttpBridge::RequestContextGetter(
+ baseline_request_context_getter_.get(), user_agent);
}
HttpPostProviderInterface* HttpBridgeFactory::Create() {
diff --git a/sync/internal_api/http_bridge_unittest.cc b/sync/internal_api/http_bridge_unittest.cc
index 68a5835..8a2c443 100644
--- a/sync/internal_api/http_bridge_unittest.cc
+++ b/sync/internal_api/http_bridge_unittest.cc
@@ -499,10 +499,10 @@ TEST_F(SyncHttpBridgeTest, EarlyAbortFactory) {
// UI Thread: Initialize the HttpBridgeFactory. The next step would be to
// post a task to SBH::Core to have it initialized.
- scoped_ptr<syncer::HttpBridgeFactory> factory(new HttpBridgeFactory(
- baseline_context_getter,
- NetworkTimeUpdateCallback(),
- &release_request_context_signal));
+ scoped_ptr<syncer::HttpBridgeFactory> factory(
+ new HttpBridgeFactory(baseline_context_getter.get(),
+ NetworkTimeUpdateCallback(),
+ &release_request_context_signal));
// UI Thread: A very early shutdown request arrives and executes on the UI
// thread before the posted sync thread task is run.