diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 14:27:23 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 14:27:23 +0000 |
commit | 2033fb861781de480cacc9c0bfb7998d7fa828e5 (patch) | |
tree | 94fd8f829e55ca7c02bd5761e51db5187d9468ad /webkit/appcache | |
parent | 7521b65a904d1a21f85e6d28501e83ee27d6a3fc (diff) | |
download | chromium_src-2033fb861781de480cacc9c0bfb7998d7fa828e5.zip chromium_src-2033fb861781de480cacc9c0bfb7998d7fa828e5.tar.gz chromium_src-2033fb861781de480cacc9c0bfb7998d7fa828e5.tar.bz2 |
Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>.
In r174057, enne@ added support for implicit testing to scoped_ptr<>. Removes
these in webkit/.
BUG=232084
Review URL: https://chromiumcodereview.appspot.com/14886011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198894 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache')
-rw-r--r-- | webkit/appcache/appcache_database.cc | 2 | ||||
-rw-r--r-- | webkit/appcache/appcache_disk_cache.cc | 6 | ||||
-rw-r--r-- | webkit/appcache/appcache_host.cc | 6 | ||||
-rw-r--r-- | webkit/appcache/appcache_quota_client.cc | 2 | ||||
-rw-r--r-- | webkit/appcache/appcache_response.cc | 4 | ||||
-rw-r--r-- | webkit/appcache/appcache_service.h | 2 | ||||
-rw-r--r-- | webkit/appcache/appcache_storage.cc | 2 | ||||
-rw-r--r-- | webkit/appcache/appcache_storage_impl.cc | 4 | ||||
-rw-r--r-- | webkit/appcache/appcache_update_job.cc | 4 | ||||
-rw-r--r-- | webkit/appcache/appcache_url_request_job.cc | 6 | ||||
-rw-r--r-- | webkit/appcache/mock_appcache_storage.cc | 2 | ||||
-rw-r--r-- | webkit/appcache/mock_appcache_storage.h | 2 | ||||
-rw-r--r-- | webkit/appcache/view_appcache_internals_job.cc | 2 |
13 files changed, 22 insertions, 22 deletions
diff --git a/webkit/appcache/appcache_database.cc b/webkit/appcache/appcache_database.cc index 67767eb..fe8fb2e 100644 --- a/webkit/appcache/appcache_database.cc +++ b/webkit/appcache/appcache_database.cc @@ -983,7 +983,7 @@ void AppCacheDatabase::ReadOnlineWhiteListRecord( } bool AppCacheDatabase::LazyOpen(bool create_if_needed) { - if (db_.get()) + if (db_) return true; // If we tried and failed once, don't try again in the same session diff --git a/webkit/appcache/appcache_disk_cache.cc b/webkit/appcache/appcache_disk_cache.cc index de94477..99bc8f8 100644 --- a/webkit/appcache/appcache_disk_cache.cc +++ b/webkit/appcache/appcache_disk_cache.cc @@ -202,7 +202,7 @@ int AppCacheDiskCache::CreateEntry(int64 key, Entry** entry, return net::ERR_IO_PENDING; } - if (!disk_cache_.get()) + if (!disk_cache_) return net::ERR_FAILED; return (new ActiveCall(this))->CreateEntry(key, entry, callback); @@ -220,7 +220,7 @@ int AppCacheDiskCache::OpenEntry(int64 key, Entry** entry, return net::ERR_IO_PENDING; } - if (!disk_cache_.get()) + if (!disk_cache_) return net::ERR_FAILED; return (new ActiveCall(this))->OpenEntry(key, entry, callback); @@ -237,7 +237,7 @@ int AppCacheDiskCache::DoomEntry(int64 key, return net::ERR_IO_PENDING; } - if (!disk_cache_.get()) + if (!disk_cache_) return net::ERR_FAILED; return (new ActiveCall(this))->DoomEntry(key, callback); diff --git a/webkit/appcache/appcache_host.cc b/webkit/appcache/appcache_host.cc index 61ff5be..b540112 100644 --- a/webkit/appcache/appcache_host.cc +++ b/webkit/appcache/appcache_host.cc @@ -58,9 +58,9 @@ AppCacheHost::AppCacheHost(int host_id, AppCacheFrontend* frontend, AppCacheHost::~AppCacheHost() { FOR_EACH_OBSERVER(Observer, observers_, OnDestructionImminent(this)); - if (associated_cache_.get()) + if (associated_cache_) associated_cache_->UnassociateHost(this); - if (group_being_updated_.get()) + if (group_being_updated_) group_being_updated_->RemoveUpdateObserver(this); service_->storage()->CancelDelegateCallbacks(this); if (service()->quota_manager_proxy() && !origin_in_use_.is_empty()) @@ -496,7 +496,7 @@ void AppCacheHost::AssociateCompleteCache(AppCache* cache) { void AppCacheHost::AssociateCacheHelper(AppCache* cache, const GURL& manifest_url) { - if (associated_cache_.get()) { + if (associated_cache_) { associated_cache_->UnassociateHost(this); } diff --git a/webkit/appcache/appcache_quota_client.cc b/webkit/appcache/appcache_quota_client.cc index a485610..d17d49e 100644 --- a/webkit/appcache/appcache_quota_client.cc +++ b/webkit/appcache/appcache_quota_client.cc @@ -211,7 +211,7 @@ net::CancelableCompletionCallback* AppCacheQuotaClient::GetServiceDeleteCallback() { // Lazily created due to CancelableCompletionCallback's threading // restrictions, there is no way to detach from the thread created on. - if (!service_delete_callback_.get()) { + if (!service_delete_callback_) { service_delete_callback_.reset( new net::CancelableCompletionCallback( base::Bind(&AppCacheQuotaClient::DidDeleteAppCachesForOrigin, diff --git a/webkit/appcache/appcache_response.cc b/webkit/appcache/appcache_response.cc index fdd0792..ddd639c 100644 --- a/webkit/appcache/appcache_response.cc +++ b/webkit/appcache/appcache_response.cc @@ -216,7 +216,7 @@ void AppCacheResponseReader::SetReadRange(int offset, int length) { void AppCacheResponseReader::OnIOComplete(int result) { if (result >= 0) { - if (info_buffer_.get()) { + if (info_buffer_) { // Deserialize the http info structure, ensuring we got headers. Pickle pickle(buffer_->data(), result); scoped_ptr<net::HttpResponseInfo> info(new net::HttpResponseInfo); @@ -349,7 +349,7 @@ void AppCacheResponseWriter::ContinueWriteData() { void AppCacheResponseWriter::OnIOComplete(int result) { if (result >= 0) { DCHECK(write_amount_ == result); - if (!info_buffer_.get()) + if (!info_buffer_) write_position_ += result; else info_size_ = result; diff --git a/webkit/appcache/appcache_service.h b/webkit/appcache/appcache_service.h index 3a4003d..b1b478e 100644 --- a/webkit/appcache/appcache_service.h +++ b/webkit/appcache/appcache_service.h @@ -64,7 +64,7 @@ class WEBKIT_STORAGE_EXPORT AppCacheService { // Purges any memory not needed. void PurgeMemory() { - if (storage_.get()) + if (storage_) storage_->PurgeMemory(); } diff --git a/webkit/appcache/appcache_storage.cc b/webkit/appcache/appcache_storage.cc index 8d0b08b..9004cae 100644 --- a/webkit/appcache/appcache_storage.cc +++ b/webkit/appcache/appcache_storage.cc @@ -57,7 +57,7 @@ AppCacheStorage::ResponseInfoLoadTask::~ResponseInfoLoadTask() { } void AppCacheStorage::ResponseInfoLoadTask::StartIfNeeded() { - if (reader_.get()) + if (reader_) return; reader_.reset( storage_->CreateResponseReader(manifest_url_, group_id_, response_id_)); diff --git a/webkit/appcache/appcache_storage_impl.cc b/webkit/appcache/appcache_storage_impl.cc index f0cb69e..6d9add0 100644 --- a/webkit/appcache/appcache_storage_impl.cc +++ b/webkit/appcache/appcache_storage_impl.cc @@ -1343,7 +1343,7 @@ void AppCacheStorageImpl::Disable() { is_disabled_ = true; ClearUsageMapAndNotify(); working_set()->Disable(); - if (disk_cache_.get()) + if (disk_cache_) disk_cache_->Disable(); scoped_refptr<DisableDatabaseTask> task(new DisableDatabaseTask(this)); task->Schedule(); @@ -1769,7 +1769,7 @@ AppCacheDiskCache* AppCacheStorageImpl::disk_cache() { if (is_disabled_) return NULL; - if (!disk_cache_.get()) { + if (!disk_cache_) { int rv = net::OK; disk_cache_.reset(new AppCacheDiskCache); if (is_incognito_) { diff --git a/webkit/appcache/appcache_update_job.cc b/webkit/appcache/appcache_update_job.cc index 2c00caf..3ac4a19 100644 --- a/webkit/appcache/appcache_update_job.cc +++ b/webkit/appcache/appcache_update_job.cc @@ -953,7 +953,7 @@ void AppCacheUpdateJob::FetchUrls() { } else { URLFetcher* fetcher = new URLFetcher( url_to_fetch.url, URLFetcher::URL_FETCH, this); - if (url_to_fetch.existing_response_info.get()) { + if (url_to_fetch.existing_response_info) { DCHECK(group_->newest_complete_cache()); AppCacheEntry* existing_entry = group_->newest_complete_cache()->GetEntry(url_to_fetch.url); @@ -1290,7 +1290,7 @@ void AppCacheUpdateJob::Cancel() { DiscardInprogressCache(); // Delete response writer to avoid any callbacks. - if (manifest_response_writer_.get()) + if (manifest_response_writer_) manifest_response_writer_.reset(); service_->storage()->CancelDelegateCallbacks(this); diff --git a/webkit/appcache/appcache_url_request_job.cc b/webkit/appcache/appcache_url_request_job.cc index 28e12fd..704e0ea 100644 --- a/webkit/appcache/appcache_url_request_job.cc +++ b/webkit/appcache/appcache_url_request_job.cc @@ -159,9 +159,9 @@ void AppCacheURLRequestJob::OnResponseInfoLoaded( } const net::HttpResponseInfo* AppCacheURLRequestJob::http_info() const { - if (!info_.get()) + if (!info_) return NULL; - if (range_response_info_.get()) + if (range_response_info_) return range_response_info_.get(); return info_->http_response_info(); } @@ -248,7 +248,7 @@ net::LoadState AppCacheURLRequestJob::GetLoadState() const { return net::LOAD_STATE_WAITING_FOR_APPCACHE; if (delivery_type_ != APPCACHED_DELIVERY) return net::LOAD_STATE_IDLE; - if (!info_.get()) + if (!info_) return net::LOAD_STATE_WAITING_FOR_APPCACHE; if (reader_.get() && reader_->IsReadPending()) return net::LOAD_STATE_READING_RESPONSE; diff --git a/webkit/appcache/mock_appcache_storage.cc b/webkit/appcache/mock_appcache_storage.cc index 6c7c431..e808d1b 100644 --- a/webkit/appcache/mock_appcache_storage.cc +++ b/webkit/appcache/mock_appcache_storage.cc @@ -152,7 +152,7 @@ void MockAppCacheStorage::MakeGroupObsolete( AppCacheResponseReader* MockAppCacheStorage::CreateResponseReader( const GURL& manifest_url, int64 group_id, int64 response_id) { - if (simulated_reader_.get()) + if (simulated_reader_) return simulated_reader_.release(); return new AppCacheResponseReader(response_id, group_id, disk_cache()); } diff --git a/webkit/appcache/mock_appcache_storage.h b/webkit/appcache/mock_appcache_storage.h index 94f30dd..b1f9a83 100644 --- a/webkit/appcache/mock_appcache_storage.h +++ b/webkit/appcache/mock_appcache_storage.h @@ -112,7 +112,7 @@ class MockAppCacheStorage : public AppCacheStorage { // Lazily constructed in-memory disk cache. AppCacheDiskCache* disk_cache() { - if (!disk_cache_.get()) { + if (!disk_cache_) { const int kMaxCacheSize = 10 * 1024 * 1024; disk_cache_.reset(new AppCacheDiskCache); disk_cache_->InitWithMemBackend(kMaxCacheSize, net::CompletionCallback()); diff --git a/webkit/appcache/view_appcache_internals_job.cc b/webkit/appcache/view_appcache_internals_job.cc index c8449a7..1cff8e1 100644 --- a/webkit/appcache/view_appcache_internals_job.cc +++ b/webkit/appcache/view_appcache_internals_job.cc @@ -349,7 +349,7 @@ class MainPageJob : public BaseInternalsJob { out->clear(); EmitPageStart(out); - if (!info_collection_.get()) { + if (!info_collection_) { out->append(kErrorMessage); } else if (info_collection_->infos_by_origin.empty()) { out->append(kEmptyAppCachesMessage); |