Commit 972bc39f authored by dcheng's avatar dcheng Committed by Commit bot

Fixups in components/ for scoped_refptr operator T* removal.

BUG=110610
TBR=rpaquay@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#293255}
parent 97b7fc9f
...@@ -55,7 +55,7 @@ class CaptivePortalDetectorTest : public testing::Test, ...@@ -55,7 +55,7 @@ class CaptivePortalDetectorTest : public testing::Test,
virtual ~CaptivePortalDetectorTest() {} virtual ~CaptivePortalDetectorTest() {}
virtual void SetUp() OVERRIDE { virtual void SetUp() OVERRIDE {
CHECK(base::MessageLoopProxy::current()); CHECK(base::MessageLoopProxy::current().get());
scoped_refptr<net::URLRequestContextGetter> request_context_getter( scoped_refptr<net::URLRequestContextGetter> request_context_getter(
new net::TestURLRequestContextGetter( new net::TestURLRequestContextGetter(
base::MessageLoopProxy::current())); base::MessageLoopProxy::current()));
......
...@@ -26,7 +26,8 @@ const base::FilePath::CharType kFeedbackReportPath[] = ...@@ -26,7 +26,8 @@ const base::FilePath::CharType kFeedbackReportPath[] =
} // namespace } // namespace
bool FeedbackUploader::ReportsUploadTimeComparator::operator()( bool FeedbackUploader::ReportsUploadTimeComparator::operator()(
FeedbackReport* a, FeedbackReport* b) const { const scoped_refptr<FeedbackReport>& a,
const scoped_refptr<FeedbackReport>& b) const {
return a->upload_at() > b->upload_at(); return a->upload_at() > b->upload_at();
} }
......
...@@ -45,7 +45,8 @@ class FeedbackUploader : public base::SupportsWeakPtr<FeedbackUploader> { ...@@ -45,7 +45,8 @@ class FeedbackUploader : public base::SupportsWeakPtr<FeedbackUploader> {
friend class FeedbackUploaderTest; friend class FeedbackUploaderTest;
struct ReportsUploadTimeComparator { struct ReportsUploadTimeComparator {
bool operator()(FeedbackReport* a, FeedbackReport* b) const; bool operator()(const scoped_refptr<FeedbackReport>& a,
const scoped_refptr<FeedbackReport>& b) const;
}; };
void Init(); void Init();
......
...@@ -100,7 +100,8 @@ class PasswordManagerTest : public testing::Test { ...@@ -100,7 +100,8 @@ class PasswordManagerTest : public testing::Test {
.WillRepeatedly(Return(true)); .WillRepeatedly(Return(true));
EXPECT_CALL(client_, IsSyncAccountCredential(_, _)) EXPECT_CALL(client_, IsSyncAccountCredential(_, _))
.WillRepeatedly(Return(false)); .WillRepeatedly(Return(false));
EXPECT_CALL(client_, GetPasswordStore()).WillRepeatedly(Return(store_)); EXPECT_CALL(client_, GetPasswordStore())
.WillRepeatedly(Return(store_.get()));
EXPECT_CALL(client_, GetPrefs()).WillRepeatedly(Return(&prefs_)); EXPECT_CALL(client_, GetPrefs()).WillRepeatedly(Return(&prefs_));
EXPECT_CALL(client_, GetDriver()).WillRepeatedly(Return(&driver_)); EXPECT_CALL(client_, GetDriver()).WillRepeatedly(Return(&driver_));
......
...@@ -255,7 +255,7 @@ void PasswordStore::Schedule( ...@@ -255,7 +255,7 @@ void PasswordStore::Schedule(
PasswordStoreConsumer* consumer) { PasswordStoreConsumer* consumer) {
GetLoginsRequest* request = new GetLoginsRequest(consumer); GetLoginsRequest* request = new GetLoginsRequest(consumer);
consumer->cancelable_task_tracker()->PostTask( consumer->cancelable_task_tracker()->PostTask(
GetBackgroundTaskRunner(), GetBackgroundTaskRunner().get(),
FROM_HERE, FROM_HERE,
base::Bind(func, this, base::Owned(request))); base::Bind(func, this, base::Owned(request)));
} }
......
...@@ -82,7 +82,7 @@ PP_Resource GetFontFileWithFallback( ...@@ -82,7 +82,7 @@ PP_Resource GetFontFileWithFallback(
scoped_refptr<ppapi::StringVar> face_name( scoped_refptr<ppapi::StringVar> face_name(
ppapi::StringVar::FromPPVar(description->face)); ppapi::StringVar::FromPPVar(description->face));
if (!face_name) if (!face_name.get())
return 0; return 0;
int fd = content::MatchFontWithFallback( int fd = content::MatchFontWithFallback(
...@@ -209,7 +209,7 @@ void HistogramPDFPageCount(PP_Instance instance, int count) { ...@@ -209,7 +209,7 @@ void HistogramPDFPageCount(PP_Instance instance, int count) {
void UserMetricsRecordAction(PP_Instance instance, PP_Var action) { void UserMetricsRecordAction(PP_Instance instance, PP_Var action) {
scoped_refptr<ppapi::StringVar> action_str( scoped_refptr<ppapi::StringVar> action_str(
ppapi::StringVar::FromPPVar(action)); ppapi::StringVar::FromPPVar(action));
if (action_str) if (action_str.get())
content::RenderThread::Get()->RecordComputedAction(action_str->value()); content::RenderThread::Get()->RecordComputedAction(action_str->value());
} }
......
...@@ -564,8 +564,11 @@ void UsbDeviceHandleImpl::ControlTransfer( ...@@ -564,8 +564,11 @@ void UsbDeviceHandleImpl::ControlTransfer(
this, this,
timeout); timeout);
PostOrSubmitTransfer( PostOrSubmitTransfer(transfer,
transfer, USB_TRANSFER_CONTROL, resized_buffer, resized_length, callback); USB_TRANSFER_CONTROL,
resized_buffer.get(),
resized_length,
callback);
} }
void UsbDeviceHandleImpl::BulkTransfer(const UsbEndpointDirection direction, void UsbDeviceHandleImpl::BulkTransfer(const UsbEndpointDirection direction,
......
...@@ -145,7 +145,7 @@ void UsbServiceImpl::RefreshDevices() { ...@@ -145,7 +145,7 @@ void UsbServiceImpl::RefreshDevices() {
// Find disconnected devices. // Find disconnected devices.
for (DeviceMap::iterator it = devices_.begin(); it != devices_.end(); ++it) { for (DeviceMap::iterator it = devices_.begin(); it != devices_.end(); ++it) {
if (!ContainsKey(connected_devices, it->second)) { if (!ContainsKey(connected_devices, it->second.get())) {
disconnected_devices.push_back(it->first); disconnected_devices.push_back(it->first);
} }
} }
......
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