Commit 24f900df authored by dcheng's avatar dcheng Committed by Commit bot

Remove implicit conversions from scoped_refptr to T* in c/b/chromeos/settings

This patch was generated by running the rewrite_scoped_refptr clang tool
on a ChromeOS build.

BUG=110610

Review URL: https://codereview.chromium.org/568413004

Cr-Commit-Position: refs/heads/master@{#294930}
parent ec2b75ec
......@@ -233,14 +233,14 @@ void DeviceSettingsService::Store(scoped_ptr<em::PolicyFetchResponse> policy,
DeviceSettingsService::OwnershipStatus
DeviceSettingsService::GetOwnershipStatus() {
if (public_key_)
if (public_key_.get())
return public_key_->is_loaded() ? OWNERSHIP_TAKEN : OWNERSHIP_NONE;
return OWNERSHIP_UNKNOWN;
}
void DeviceSettingsService::GetOwnershipStatusAsync(
const OwnershipStatusCallback& callback) {
if (public_key_) {
if (public_key_.get()) {
// If there is a key, report status immediately.
base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(callback, GetOwnershipStatus()));
......
......@@ -74,7 +74,7 @@ void SessionManagerOperation::ReportResult(
}
void SessionManagerOperation::EnsurePublicKey(const base::Closure& callback) {
if (force_key_load_ || !public_key_ || !public_key_->is_loaded()) {
if (force_key_load_ || !public_key_.get() || !public_key_->is_loaded()) {
scoped_refptr<base::TaskRunner> task_runner =
content::BrowserThread::GetBlockingPool()
->GetTaskRunnerWithShutdownBehavior(
......@@ -100,7 +100,7 @@ scoped_refptr<PublicKey> SessionManagerOperation::LoadPublicKey(
scoped_refptr<PublicKey> public_key(new PublicKey());
// Keep already-existing public key.
if (current_key && current_key->is_loaded()) {
if (current_key.get() && current_key->is_loaded()) {
public_key->data() = current_key->data();
}
if (!public_key->is_loaded() && util->IsPublicKeyPresent()) {
......@@ -116,7 +116,7 @@ void SessionManagerOperation::StorePublicKey(const base::Closure& callback,
force_key_load_ = false;
public_key_ = new_key;
if (!public_key_ || !public_key_->is_loaded()) {
if (!public_key_.get() || !public_key_->is_loaded()) {
ReportResult(DeviceSettingsService::STORE_KEY_UNAVAILABLE);
return;
}
......
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