Commit 12c173d0 authored by Daniel Cheng's avatar Daniel Cheng

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}
parent 79270799
......@@ -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
......@@ -306,11 +306,12 @@ 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(),
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
......
......@@ -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() {
......
......@@ -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(
......
......@@ -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;
......
......@@ -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() {
......
......@@ -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() {
......
......@@ -499,8 +499,8 @@ 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,
scoped_ptr<syncer::HttpBridgeFactory> factory(
new HttpBridgeFactory(baseline_context_getter.get(),
NetworkTimeUpdateCallback(),
&release_request_context_signal));
......
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