Commit 130d3f51 authored by dcheng's avatar dcheng Committed by Commit bot

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

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

BUG=110610

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

Cr-Commit-Position: refs/heads/master@{#294629}
parent e610c024
......@@ -120,7 +120,7 @@ bool FakeLoginUtils::RestartToApplyPerSessionFlagsIfNeed(Profile* profile,
void FakeLoginUtils::SetExpectedCredentials(const UserContext& user_context) {
expected_user_context_ = user_context;
if (authenticator_) {
if (authenticator_.get()) {
static_cast<MockAuthenticator*>(authenticator_.get())->
SetExpectedCredentials(user_context);
}
......
......@@ -243,7 +243,7 @@ class JsConditionWaiter {
}
void OnTimer() {
DCHECK(runner_);
DCHECK(runner_.get());
if (CheckJs())
runner_->Quit();
}
......@@ -1092,7 +1092,7 @@ class KioskUpdateTest : public KioskTest {
virtual void OnKioskAppExternalUpdateComplete(bool success) OVERRIDE {
quit_ = true;
update_success_ = success;
if (runner_)
if (runner_.get())
runner_->Quit();
}
......@@ -1144,7 +1144,7 @@ class KioskUpdateTest : public KioskTest {
return;
loaded_ = true;
quit_ = true;
if (runner_)
if (runner_.get())
runner_->Quit();
}
......@@ -1152,7 +1152,7 @@ class KioskUpdateTest : public KioskTest {
const std::string& app_id) OVERRIDE {
loaded_ = false;
quit_ = true;
if (runner_)
if (runner_.get())
runner_->Quit();
}
......
......@@ -461,7 +461,7 @@ ScreenLocker::~ScreenLocker() {
DBusThreadManager::Get()->GetSessionManagerClient()->
NotifyLockScreenDismissed();
if (saved_ime_state_) {
if (saved_ime_state_.get()) {
input_method::InputMethodManager::Get()->SetState(saved_ime_state_);
}
}
......
......@@ -105,7 +105,7 @@ bool ScreenshotTester::SaveImage(const std::string& file_name,
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
base::FilePath screenshot_path =
screenshot_dir.AppendASCII(test_name_ + "_" + file_name + ".png");
if (!png_data) {
if (!png_data.get()) {
LOG(ERROR) << "Can't take a screenshot";
return false;
}
......
......@@ -1008,7 +1008,7 @@ scoped_refptr<input_method::InputMethodManager::State>
UserSessionManager::GetDefaultIMEState(Profile* profile) {
scoped_refptr<input_method::InputMethodManager::State> state =
default_ime_states_[profile];
if (!state) {
if (!state.get()) {
// Profile can be NULL in tests.
state = input_method::InputMethodManager::Get()->CreateNewState(profile);
default_ime_states_[profile] = state;
......
......@@ -436,7 +436,7 @@ void UserImageManagerImpl::Job::SaveImageAndUpdateLocalState() {
image_path_ = user_data_dir.Append(user_id() + kSafeImagePathExtension);
base::PostTaskAndReplyWithResult(
parent_->background_task_runner_,
parent_->background_task_runner_.get(),
FROM_HERE,
base::Bind(&SaveImage, user_image_, image_path_),
base::Bind(&Job::OnSaveImageDone, weak_factory_.GetWeakPtr()));
......
......@@ -1788,7 +1788,7 @@ WallpaperManager::PendingWallpaper* WallpaperManager::GetPendingWallpaper(
(delayed ? GetWallpaperLoadDelay()
: base::TimeDelta::FromMilliseconds(0)),
user_id));
pending_inactive_ = loading_.back();
pending_inactive_ = loading_.back().get();
}
return pending_inactive_;
}
......
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