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