diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-02 21:13:46 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-02 21:13:46 +0000 |
commit | fc72bb18b111ff63e57135d97de6d59291f3b7b8 (patch) | |
tree | f7fedf0a0577e38a0486e8bdc88a47a508bf122d /content/browser/device_orientation/provider_impl.cc | |
parent | 7cd76fded67d66fb8ea4f5abce5241ad71d749a9 (diff) | |
download | chromium_src-fc72bb18b111ff63e57135d97de6d59291f3b7b8.zip chromium_src-fc72bb18b111ff63e57135d97de6d59291f3b7b8.tar.gz chromium_src-fc72bb18b111ff63e57135d97de6d59291f3b7b8.tar.bz2 |
Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*"
Linux fixes
BUG=110610
TBR=darin
Review URL: https://chromiumcodereview.appspot.com/16294003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203624 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/device_orientation/provider_impl.cc')
-rw-r--r-- | content/browser/device_orientation/provider_impl.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/content/browser/device_orientation/provider_impl.cc b/content/browser/device_orientation/provider_impl.cc index 59bdebf..25e9bfd 100644 --- a/content/browser/device_orientation/provider_impl.cc +++ b/content/browser/device_orientation/provider_impl.cc @@ -89,7 +89,7 @@ void ProviderImpl::PollingThread::Initialize(DataFetcherFactory factory, if (fetcher) { scoped_refptr<const DeviceData> device_data(fetcher->GetDeviceData(type)); - if (device_data != NULL) { + if (device_data.get() != NULL) { // Pass ownership of fetcher to provider_. data_fetcher_.swap(fetcher); last_device_data_map_[type] = device_data; @@ -129,13 +129,13 @@ void ProviderImpl::PollingThread::DoPoll() { scoped_refptr<const DeviceData> device_data(data_fetcher_->GetDeviceData( device_data_type)); - if (device_data == NULL) { + if (device_data.get() == NULL) { LOG(ERROR) << "Failed to poll device data fetcher."; ScheduleDoNotify(NULL, device_data_type); continue; } - const DeviceData* old_data = last_device_data_map_[device_data_type]; + const DeviceData* old_data = last_device_data_map_[device_data_type].get(); if (old_data != NULL && !device_data->ShouldFireEvent(old_data)) continue; @@ -197,7 +197,7 @@ void ProviderImpl::AddObserver(Observer* observer) { Start(type); else { // Notify observer of most recent notification if one exists. - const DeviceData *last_notification = last_notifications_map_[type]; + const DeviceData* last_notification = last_notifications_map_[type].get(); if (last_notification != NULL) observer->OnDeviceDataUpdate(last_notification, type); } @@ -273,7 +273,7 @@ void ProviderImpl::DoNotify(const scoped_refptr<const DeviceData>& data, (*i)->OnDeviceDataUpdate(data.get(), device_data_type); } - if (data == NULL) { + if (data.get() == NULL) { // Notify observers exactly once about failure to provide data. typedef std::set<Observer*>::iterator Iterator; Iterator i = observers_.begin(); |