summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 14:27:23 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 14:27:23 +0000
commit2033fb861781de480cacc9c0bfb7998d7fa828e5 (patch)
tree94fd8f829e55ca7c02bd5761e51db5187d9468ad
parent7521b65a904d1a21f85e6d28501e83ee27d6a3fc (diff)
downloadchromium_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
-rw-r--r--webkit/appcache/appcache_database.cc2
-rw-r--r--webkit/appcache/appcache_disk_cache.cc6
-rw-r--r--webkit/appcache/appcache_host.cc6
-rw-r--r--webkit/appcache/appcache_quota_client.cc2
-rw-r--r--webkit/appcache/appcache_response.cc4
-rw-r--r--webkit/appcache/appcache_service.h2
-rw-r--r--webkit/appcache/appcache_storage.cc2
-rw-r--r--webkit/appcache/appcache_storage_impl.cc4
-rw-r--r--webkit/appcache/appcache_update_job.cc4
-rw-r--r--webkit/appcache/appcache_url_request_job.cc6
-rw-r--r--webkit/appcache/mock_appcache_storage.cc2
-rw-r--r--webkit/appcache/mock_appcache_storage.h2
-rw-r--r--webkit/appcache/view_appcache_internals_job.cc2
-rw-r--r--webkit/blob/blob_data_handle.cc4
-rw-r--r--webkit/blob/blob_storage_context.cc2
-rw-r--r--webkit/blob/blob_url_request_job.cc6
-rw-r--r--webkit/blob/local_file_stream_reader.cc2
-rw-r--r--webkit/chromeos/fileapi/remote_file_stream_writer.cc4
-rw-r--r--webkit/chromeos/fileapi/remote_file_system_operation.cc2
-rw-r--r--webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc2
-rw-r--r--webkit/dom_storage/dom_storage_area.cc20
-rw-r--r--webkit/dom_storage/dom_storage_context.cc12
-rw-r--r--webkit/dom_storage/dom_storage_namespace.cc2
-rw-r--r--webkit/fileapi/file_system_directory_database.cc2
-rw-r--r--webkit/fileapi/file_system_file_stream_reader.cc8
-rw-r--r--webkit/fileapi/file_system_origin_database.cc2
-rw-r--r--webkit/fileapi/file_system_url_request_job.cc4
-rw-r--r--webkit/fileapi/file_writer_delegate.cc4
-rw-r--r--webkit/fileapi/local_file_stream_writer.cc4
-rw-r--r--webkit/fileapi/local_file_system_operation.cc2
-rw-r--r--webkit/fileapi/obfuscated_file_util.cc4
-rw-r--r--webkit/fileapi/sandbox_file_stream_writer.cc2
-rw-r--r--webkit/fileapi/sandbox_mount_point_provider.cc2
-rw-r--r--webkit/fileapi/syncable/local_file_sync_context.cc4
-rw-r--r--webkit/fileapi/syncable/syncable_file_system_operation.cc4
-rw-r--r--webkit/glue/resource_fetcher.cc2
-rw-r--r--webkit/glue/scoped_clipboard_writer_glue.cc4
-rw-r--r--webkit/glue/weburlloader_impl.cc18
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc24
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.cc14
-rw-r--r--webkit/media/android/webmediaplayer_android.cc2
-rw-r--r--webkit/media/buffered_data_source.cc4
-rw-r--r--webkit/media/buffered_resource_loader.cc8
-rw-r--r--webkit/media/webmediaplayer_ms.cc6
-rw-r--r--webkit/plugins/npapi/plugin_host.cc24
-rw-r--r--webkit/plugins/npapi/plugin_lib_win.cc2
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl_mac.mm2
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl_win.cc8
-rw-r--r--webkit/plugins/npapi/webplugin_impl.cc2
-rw-r--r--webkit/plugins/ppapi/audio_helper.cc4
-rw-r--r--webkit/plugins/ppapi/host_array_buffer_var.cc2
-rw-r--r--webkit/plugins/ppapi/plugin_module.cc8
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc16
-rw-r--r--webkit/plugins/ppapi/ppb_file_ref_impl.cc6
-rw-r--r--webkit/plugins/ppapi/ppb_graphics_3d_impl.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_image_data_impl.cc6
-rw-r--r--webkit/plugins/ppapi/ppb_scrollbar_impl.cc14
-rw-r--r--webkit/plugins/ppapi/ppb_url_loader_impl.cc14
-rw-r--r--webkit/plugins/ppapi/ppb_video_decoder_impl.cc12
-rw-r--r--webkit/plugins/webview_plugin.cc2
-rw-r--r--webkit/quota/quota_database.cc6
-rw-r--r--webkit/quota/quota_manager.cc6
-rw-r--r--webkit/tools/test_shell/simple_dom_storage_system.cc4
-rw-r--r--webkit/tools/test_shell/simple_file_system.cc4
-rw-r--r--webkit/tools/test_shell/simple_resource_loader_bridge.cc6
-rw-r--r--webkit/tools/test_shell/test_shell.cc8
-rw-r--r--webkit/tools/test_shell/test_webview_delegate_mac.mm2
-rw-r--r--webkit/tools/test_shell/webwidget_host_gtk.cc4
-rw-r--r--webkit/tools/test_shell/webwidget_host_mac.mm2
-rw-r--r--webkit/tools/test_shell/webwidget_host_win.cc2
70 files changed, 196 insertions, 196 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);
diff --git a/webkit/blob/blob_data_handle.cc b/webkit/blob/blob_data_handle.cc
index e61c88b..5e77df3 100644
--- a/webkit/blob/blob_data_handle.cc
+++ b/webkit/blob/blob_data_handle.cc
@@ -28,7 +28,7 @@ BlobDataHandle::~BlobDataHandle() {
if (io_task_runner_->RunsTasksOnCurrentThread()) {
// Note: Do not test context_ or alter the blob_data_ refcount
// on the wrong thread.
- if (context_.get())
+ if (context_)
context_->DecrementBlobRefCount(blob_data_->uuid());
blob_data_->Release();
return;
@@ -48,7 +48,7 @@ BlobData* BlobDataHandle::data() const {
void BlobDataHandle::DeleteHelper(
base::WeakPtr<BlobStorageContext> context,
BlobData* blob_data) {
- if (context.get())
+ if (context)
context->DecrementBlobRefCount(blob_data->uuid());
blob_data->Release();
}
diff --git a/webkit/blob/blob_storage_context.cc b/webkit/blob/blob_storage_context.cc
index 557ce1e..b949a5f 100644
--- a/webkit/blob/blob_storage_context.cc
+++ b/webkit/blob/blob_storage_context.cc
@@ -147,7 +147,7 @@ void BlobStorageContext::AppendBlobDataItem(
break;
case BlobData::Item::TYPE_BLOB: {
scoped_ptr<BlobDataHandle> src = GetBlobDataFromUUID(item.blob_uuid());
- if (src.get())
+ if (src)
exceeded_memory = !ExpandStorageItems(target_blob_data,
src->data(),
item.offset(),
diff --git a/webkit/blob/blob_url_request_job.cc b/webkit/blob/blob_url_request_job.cc
index 929500e..df00ae8 100644
--- a/webkit/blob/blob_url_request_job.cc
+++ b/webkit/blob/blob_url_request_job.cc
@@ -128,19 +128,19 @@ bool BlobURLRequestJob::ReadRawData(net::IOBuffer* dest,
}
bool BlobURLRequestJob::GetMimeType(std::string* mime_type) const {
- if (!response_info_.get())
+ if (!response_info_)
return false;
return response_info_->headers->GetMimeType(mime_type);
}
void BlobURLRequestJob::GetResponseInfo(net::HttpResponseInfo* info) {
- if (response_info_.get())
+ if (response_info_)
*info = *response_info_;
}
int BlobURLRequestJob::GetResponseCode() const {
- if (!response_info_.get())
+ if (!response_info_)
return -1;
return response_info_->headers->response_code();
diff --git a/webkit/blob/local_file_stream_reader.cc b/webkit/blob/local_file_stream_reader.cc
index 09c0856..b2db0c6 100644
--- a/webkit/blob/local_file_stream_reader.cc
+++ b/webkit/blob/local_file_stream_reader.cc
@@ -50,7 +50,7 @@ LocalFileStreamReader::~LocalFileStreamReader() {
int LocalFileStreamReader::Read(net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback) {
DCHECK(!has_pending_open_);
- if (stream_impl_.get())
+ if (stream_impl_)
return stream_impl_->Read(buf, buf_len, callback);
return Open(base::Bind(&LocalFileStreamReader::DidOpenForRead,
weak_factory_.GetWeakPtr(),
diff --git a/webkit/chromeos/fileapi/remote_file_stream_writer.cc b/webkit/chromeos/fileapi/remote_file_stream_writer.cc
index 3df091e9..384502e 100644
--- a/webkit/chromeos/fileapi/remote_file_stream_writer.cc
+++ b/webkit/chromeos/fileapi/remote_file_stream_writer.cc
@@ -33,7 +33,7 @@ int RemoteFileStreamWriter::Write(net::IOBuffer* buf,
DCHECK(!has_pending_create_snapshot_);
DCHECK(pending_cancel_callback_.is_null());
- if (!local_file_writer_.get()) {
+ if (!local_file_writer_) {
has_pending_create_snapshot_ = true;
// In this RemoteFileStreamWriter, we only create snapshot file and don't
// have explicit close operation. This is ok, because close is automatically
@@ -93,7 +93,7 @@ int RemoteFileStreamWriter::Cancel(const net::CompletionCallback& callback) {
}
// If LocalFileWriter is already created, just delegate the cancel to it.
- if (local_file_writer_.get()) {
+ if (local_file_writer_) {
pending_cancel_callback_ = callback;
return local_file_writer_->Cancel(
base::Bind(&RemoteFileStreamWriter::InvokePendingCancelCallback,
diff --git a/webkit/chromeos/fileapi/remote_file_system_operation.cc b/webkit/chromeos/fileapi/remote_file_system_operation.cc
index b85b5ed..153657c 100644
--- a/webkit/chromeos/fileapi/remote_file_system_operation.cc
+++ b/webkit/chromeos/fileapi/remote_file_system_operation.cc
@@ -144,7 +144,7 @@ void RemoteFileSystemOperation::Truncate(const FileSystemURL& url,
}
void RemoteFileSystemOperation::Cancel(const StatusCallback& cancel_callback) {
- if (file_writer_delegate_.get()) {
+ if (file_writer_delegate_) {
DCHECK_EQ(kOperationWrite, pending_operation_);
// Writes are done without proxying through FileUtilProxy after the initial
diff --git a/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc b/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc
index 5afb01c..4953ab9 100644
--- a/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc
+++ b/webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc
@@ -56,7 +56,7 @@ bool WebLayerTreeViewImplForTesting::initialize(
type_ == webkit_support::FAKE_CONTEXT;
layer_tree_host_ =
cc::LayerTreeHost::Create(this, settings, compositor_thread.Pass());
- if (!layer_tree_host_.get())
+ if (!layer_tree_host_)
return false;
return true;
}
diff --git a/webkit/dom_storage/dom_storage_area.cc b/webkit/dom_storage/dom_storage_area.cc
index 08bb6bf..3c7f773 100644
--- a/webkit/dom_storage/dom_storage_area.cc
+++ b/webkit/dom_storage/dom_storage_area.cc
@@ -134,7 +134,7 @@ bool DomStorageArea::SetItem(const base::string16& key,
if (!map_->HasOneRef())
map_ = map_->DeepCopy();
bool success = map_->SetItem(key, value, old_value);
- if (success && backing_.get()) {
+ if (success && backing_) {
CommitBatch* commit_batch = CreateCommitBatchIfNeeded();
commit_batch->changed_values[key] = NullableString16(value, false);
}
@@ -149,7 +149,7 @@ bool DomStorageArea::RemoveItem(const base::string16& key,
if (!map_->HasOneRef())
map_ = map_->DeepCopy();
bool success = map_->RemoveItem(key, old_value);
- if (success && backing_.get()) {
+ if (success && backing_) {
CommitBatch* commit_batch = CreateCommitBatchIfNeeded();
commit_batch->changed_values[key] = NullableString16(true);
}
@@ -165,7 +165,7 @@ bool DomStorageArea::Clear() {
map_ = new DomStorageMap(kPerAreaQuota + kPerAreaOverQuotaAllowance);
- if (backing_.get()) {
+ if (backing_) {
CommitBatch* commit_batch = CreateCommitBatchIfNeeded();
commit_batch->clear_all_first = true;
commit_batch->changed_values.clear();
@@ -186,7 +186,7 @@ void DomStorageArea::FastClear() {
// from the database. This mechanism fails if PurgeMemory is called.
is_initial_import_done_ = true;
- if (backing_.get()) {
+ if (backing_) {
CommitBatch* commit_batch = CreateCommitBatchIfNeeded();
commit_batch->clear_all_first = true;
commit_batch->changed_values.clear();
@@ -210,7 +210,7 @@ DomStorageArea* DomStorageArea::ShallowCopy(
// shallow copy is made (scheduled by the upper layer). Another OnCommitTimer
// call might be in the event queue at this point, but it's handled gracefully
// when it fires.
- if (commit_batch_.get())
+ if (commit_batch_)
OnCommitTimer();
return copy;
}
@@ -234,7 +234,7 @@ void DomStorageArea::DeleteOrigin() {
return;
}
map_ = new DomStorageMap(kPerAreaQuota + kPerAreaOverQuotaAllowance);
- if (backing_.get()) {
+ if (backing_) {
is_initial_import_done_ = false;
backing_->Reset();
backing_->DeleteFiles();
@@ -263,7 +263,7 @@ void DomStorageArea::Shutdown() {
DCHECK(!is_shutdown_);
is_shutdown_ = true;
map_ = NULL;
- if (!backing_.get())
+ if (!backing_)
return;
bool success = task_runner_->PostShutdownBlockingTask(
@@ -312,7 +312,7 @@ void DomStorageArea::InitialImportIfNeeded() {
DomStorageArea::CommitBatch* DomStorageArea::CreateCommitBatchIfNeeded() {
DCHECK(!is_shutdown_);
- if (!commit_batch_.get()) {
+ if (!commit_batch_) {
commit_batch_.reset(new CommitBatch());
// Start a timer to commit any changes that accrue in the batch, but only if
@@ -336,7 +336,7 @@ void DomStorageArea::OnCommitTimer() {
// It's possible that there is nothing to commit, since a shallow copy occured
// before the timer fired.
- if (!commit_batch_.get())
+ if (!commit_batch_)
return;
// This method executes on the primary sequence, we schedule
@@ -381,7 +381,7 @@ void DomStorageArea::ShutdownInCommitSequence() {
// This method executes on the commit sequence.
DCHECK(task_runner_->IsRunningOnCommitSequence());
DCHECK(backing_.get());
- if (commit_batch_.get()) {
+ if (commit_batch_) {
// Commit any changes that accrued prior to the timer firing.
bool success = backing_->CommitChanges(
commit_batch_->clear_all_first,
diff --git a/webkit/dom_storage/dom_storage_context.cc b/webkit/dom_storage/dom_storage_context.cc
index 80df009..067f187 100644
--- a/webkit/dom_storage/dom_storage_context.cc
+++ b/webkit/dom_storage/dom_storage_context.cc
@@ -43,7 +43,7 @@ DomStorageContext::DomStorageContext(
}
DomStorageContext::~DomStorageContext() {
- if (session_storage_database_.get()) {
+ if (session_storage_database_) {
// SessionStorageDatabase shouldn't be deleted right away: deleting it will
// potentially involve waiting in leveldb::DBImpl::~DBImpl, and waiting
// shouldn't happen on this thread.
@@ -107,7 +107,7 @@ void DomStorageContext::GetLocalStorageUsage(
void DomStorageContext::GetSessionStorageUsage(
std::vector<SessionStorageUsageInfo>* infos) {
- if (!session_storage_database_.get())
+ if (!session_storage_database_)
return;
std::map<std::string, std::vector<GURL> > namespaces_and_origins;
session_storage_database_->ReadNamespacesAndOrigins(
@@ -176,7 +176,7 @@ void DomStorageContext::Shutdown() {
for (; it != namespaces_.end(); ++it)
it->second->Shutdown();
- if (localstorage_directory_.empty() && !session_storage_database_.get())
+ if (localstorage_directory_.empty() && !session_storage_database_)
return;
// Respect the content policy settings about what to
@@ -264,7 +264,7 @@ void DomStorageContext::DeleteSessionNamespace(
if (it == namespaces_.end())
return;
std::string persistent_namespace_id = it->second->persistent_namespace_id();
- if (session_storage_database_.get()) {
+ if (session_storage_database_) {
if (!should_persist_data) {
task_runner_->PostShutdownBlockingTask(
FROM_HERE,
@@ -321,7 +321,7 @@ void DomStorageContext::ClearSessionOnlyOrigins() {
kNotRecursive);
}
}
- if (session_storage_database_.get()) {
+ if (session_storage_database_) {
std::vector<SessionStorageUsageInfo> infos;
GetSessionStorageUsage(&infos);
for (size_t i = 0; i < infos.size(); ++i) {
@@ -345,7 +345,7 @@ void DomStorageContext::SetSaveSessionStorageOnDisk() {
}
void DomStorageContext::StartScavengingUnusedSessionStorage() {
- if (session_storage_database_.get()) {
+ if (session_storage_database_) {
task_runner_->PostDelayedTask(
FROM_HERE, base::Bind(&DomStorageContext::FindUnusedNamespaces, this),
base::TimeDelta::FromSeconds(kSessionStoraceScavengingSeconds));
diff --git a/webkit/dom_storage/dom_storage_namespace.cc b/webkit/dom_storage/dom_storage_namespace.cc
index 941a169..1128ca3 100644
--- a/webkit/dom_storage/dom_storage_namespace.cc
+++ b/webkit/dom_storage/dom_storage_namespace.cc
@@ -86,7 +86,7 @@ DomStorageNamespace* DomStorageNamespace::Clone(
clone->areas_[it->first] = AreaHolder(area, 0);
}
// And clone the on-disk structures, too.
- if (session_storage_database_.get()) {
+ if (session_storage_database_) {
task_runner_->PostShutdownBlockingTask(
FROM_HERE,
DomStorageTaskRunner::COMMIT_SEQUENCE,
diff --git a/webkit/fileapi/file_system_directory_database.cc b/webkit/fileapi/file_system_directory_database.cc
index 95bd88f..c6ca09d 100644
--- a/webkit/fileapi/file_system_directory_database.cc
+++ b/webkit/fileapi/file_system_directory_database.cc
@@ -705,7 +705,7 @@ bool FileSystemDirectoryDatabase::DestroyDatabase(const base::FilePath& path) {
}
bool FileSystemDirectoryDatabase::Init(RecoveryOption recovery_option) {
- if (db_.get())
+ if (db_)
return true;
std::string path =
diff --git a/webkit/fileapi/file_system_file_stream_reader.cc b/webkit/fileapi/file_system_file_stream_reader.cc
index f4f2272..9958894 100644
--- a/webkit/fileapi/file_system_file_stream_reader.cc
+++ b/webkit/fileapi/file_system_file_stream_reader.cc
@@ -24,7 +24,7 @@ namespace {
void ReadAdapter(base::WeakPtr<FileSystemFileStreamReader> reader,
net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback) {
- if (!reader.get())
+ if (!reader)
return;
int rv = reader->Read(buf, buf_len, callback);
if (rv != net::ERR_IO_PENDING)
@@ -33,7 +33,7 @@ void ReadAdapter(base::WeakPtr<FileSystemFileStreamReader> reader,
void GetLengthAdapter(base::WeakPtr<FileSystemFileStreamReader> reader,
const net::Int64CompletionCallback& callback) {
- if (!reader.get())
+ if (!reader)
return;
int rv = reader->GetLength(callback);
if (rv != net::ERR_IO_PENDING)
@@ -66,7 +66,7 @@ FileSystemFileStreamReader::~FileSystemFileStreamReader() {
int FileSystemFileStreamReader::Read(
net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback) {
- if (local_file_reader_.get())
+ if (local_file_reader_)
return local_file_reader_->Read(buf, buf_len, callback);
return CreateSnapshot(
base::Bind(&ReadAdapter, weak_factory_.GetWeakPtr(),
@@ -76,7 +76,7 @@ int FileSystemFileStreamReader::Read(
int64 FileSystemFileStreamReader::GetLength(
const net::Int64CompletionCallback& callback) {
- if (local_file_reader_.get())
+ if (local_file_reader_)
return local_file_reader_->GetLength(callback);
return CreateSnapshot(
base::Bind(&GetLengthAdapter, weak_factory_.GetWeakPtr(), callback),
diff --git a/webkit/fileapi/file_system_origin_database.cc b/webkit/fileapi/file_system_origin_database.cc
index 6853587..1663d36 100644
--- a/webkit/fileapi/file_system_origin_database.cc
+++ b/webkit/fileapi/file_system_origin_database.cc
@@ -75,7 +75,7 @@ FileSystemOriginDatabase::~FileSystemOriginDatabase() {
}
bool FileSystemOriginDatabase::Init(RecoveryOption recovery_option) {
- if (db_.get())
+ if (db_)
return true;
std::string path =
diff --git a/webkit/fileapi/file_system_url_request_job.cc b/webkit/fileapi/file_system_url_request_job.cc
index cdf7b40..ef560da 100644
--- a/webkit/fileapi/file_system_url_request_job.cc
+++ b/webkit/fileapi/file_system_url_request_job.cc
@@ -142,12 +142,12 @@ void FileSystemURLRequestJob::SetExtraRequestHeaders(
}
void FileSystemURLRequestJob::GetResponseInfo(net::HttpResponseInfo* info) {
- if (response_info_.get())
+ if (response_info_)
*info = *response_info_;
}
int FileSystemURLRequestJob::GetResponseCode() const {
- if (response_info_.get())
+ if (response_info_)
return 200;
return URLRequestJob::GetResponseCode();
}
diff --git a/webkit/fileapi/file_writer_delegate.cc b/webkit/fileapi/file_writer_delegate.cc
index 4eb902c..d76b4dc 100644
--- a/webkit/fileapi/file_writer_delegate.cc
+++ b/webkit/fileapi/file_writer_delegate.cc
@@ -61,7 +61,7 @@ void FileWriterDelegate::Start(scoped_ptr<net::URLRequest> request) {
}
bool FileWriterDelegate::Cancel() {
- if (request_.get()) {
+ if (request_) {
// This halts any callbacks on this delegate.
request_->set_delegate(NULL);
request_->Cancel();
@@ -186,7 +186,7 @@ FileWriterDelegate::GetCompletionStatusOnError() const {
}
void FileWriterDelegate::OnError(base::PlatformFileError error) {
- if (request_.get()) {
+ if (request_) {
request_->set_delegate(NULL);
request_->Cancel();
}
diff --git a/webkit/fileapi/local_file_stream_writer.cc b/webkit/fileapi/local_file_stream_writer.cc
index 40e3725..e684be8 100644
--- a/webkit/fileapi/local_file_stream_writer.cc
+++ b/webkit/fileapi/local_file_stream_writer.cc
@@ -43,7 +43,7 @@ int LocalFileStreamWriter::Write(net::IOBuffer* buf, int buf_len,
DCHECK(cancel_callback_.is_null());
has_pending_operation_ = true;
- if (stream_impl_.get()) {
+ if (stream_impl_) {
int result = InitiateWrite(buf, buf_len, callback);
if (result != net::ERR_IO_PENDING)
has_pending_operation_ = false;
@@ -69,7 +69,7 @@ int LocalFileStreamWriter::Flush(const net::CompletionCallback& callback) {
DCHECK(cancel_callback_.is_null());
// Write() is not called yet, so there's nothing to flush.
- if (!stream_impl_.get())
+ if (!stream_impl_)
return net::OK;
has_pending_operation_ = true;
diff --git a/webkit/fileapi/local_file_system_operation.cc b/webkit/fileapi/local_file_system_operation.cc
index 1e870c3..27fc1f8 100644
--- a/webkit/fileapi/local_file_system_operation.cc
+++ b/webkit/fileapi/local_file_system_operation.cc
@@ -379,7 +379,7 @@ void LocalFileSystemOperation::OpenFile(const FileSystemURL& url,
// We can only get here on a write or truncate that's not yet completed.
// We don't support cancelling any other operation at this time.
void LocalFileSystemOperation::Cancel(const StatusCallback& cancel_callback) {
- if (file_writer_delegate_.get()) {
+ if (file_writer_delegate_) {
DCHECK_EQ(kOperationWrite, pending_operation_);
// Writes are done without proxying through FileUtilProxy after the initial
diff --git a/webkit/fileapi/obfuscated_file_util.cc b/webkit/fileapi/obfuscated_file_util.cc
index be1c595..dfa38e87 100644
--- a/webkit/fileapi/obfuscated_file_util.cc
+++ b/webkit/fileapi/obfuscated_file_util.cc
@@ -920,7 +920,7 @@ bool ObfuscatedFileUtil::DeleteDirectoryForOriginAndType(
// No other directories seem exist. Try deleting the entire origin directory.
InitOriginDatabase(false);
- if (origin_database_.get())
+ if (origin_database_)
origin_database_->RemovePathForOrigin(GetOriginIdentifierFromURL(origin));
if (!file_util::Delete(origin_path, true /* recursive */))
return false;
@@ -1226,7 +1226,7 @@ void ObfuscatedFileUtil::DropDatabases() {
}
bool ObfuscatedFileUtil::InitOriginDatabase(bool create) {
- if (!origin_database_.get()) {
+ if (!origin_database_) {
if (!create && !file_util::DirectoryExists(file_system_directory_))
return false;
if (!file_util::CreateDirectory(file_system_directory_)) {
diff --git a/webkit/fileapi/sandbox_file_stream_writer.cc b/webkit/fileapi/sandbox_file_stream_writer.cc
index 8134753..322a927 100644
--- a/webkit/fileapi/sandbox_file_stream_writer.cc
+++ b/webkit/fileapi/sandbox_file_stream_writer.cc
@@ -63,7 +63,7 @@ int SandboxFileStreamWriter::Write(
net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback) {
has_pending_operation_ = true;
- if (local_file_writer_.get())
+ if (local_file_writer_)
return WriteInternal(buf, buf_len, callback);
base::PlatformFileError error_code;
diff --git a/webkit/fileapi/sandbox_mount_point_provider.cc b/webkit/fileapi/sandbox_mount_point_provider.cc
index 9c3a94b..27eaa42 100644
--- a/webkit/fileapi/sandbox_mount_point_provider.cc
+++ b/webkit/fileapi/sandbox_mount_point_provider.cc
@@ -97,7 +97,7 @@ void DidValidateFileSystemRoot(
base::WeakPtr<SandboxMountPointProvider> mount_point_provider,
const FileSystemMountPointProvider::ValidateFileSystemCallback& callback,
base::PlatformFileError* error) {
- if (mount_point_provider.get())
+ if (mount_point_provider)
mount_point_provider.get()->CollectOpenFileSystemMetrics(*error);
callback.Run(*error);
}
diff --git a/webkit/fileapi/syncable/local_file_sync_context.cc b/webkit/fileapi/syncable/local_file_sync_context.cc
index b81d643..fc999b6 100644
--- a/webkit/fileapi/syncable/local_file_sync_context.cc
+++ b/webkit/fileapi/syncable/local_file_sync_context.cc
@@ -373,7 +373,7 @@ void LocalFileSyncContext::RemoveOriginChangeObserver(
base::WeakPtr<SyncableFileOperationRunner>
LocalFileSyncContext::operation_runner() const {
DCHECK(io_task_runner_->RunsTasksOnCurrentThread());
- if (operation_runner_.get())
+ if (operation_runner_)
return operation_runner_->AsWeakPtr();
return base::WeakPtr<SyncableFileOperationRunner>();
}
@@ -466,7 +466,7 @@ void LocalFileSyncContext::InitializeFileSystemContextOnIOThread(
base::Owned(origins_with_changes)));
return;
}
- if (!operation_runner_.get()) {
+ if (!operation_runner_) {
DCHECK(!sync_status_);
DCHECK(!timer_on_io_);
sync_status_.reset(new LocalFileSyncStatus);
diff --git a/webkit/fileapi/syncable/syncable_file_system_operation.cc b/webkit/fileapi/syncable/syncable_file_system_operation.cc
index 32cfd4a..2847bca 100644
--- a/webkit/fileapi/syncable/syncable_file_system_operation.cc
+++ b/webkit/fileapi/syncable/syncable_file_system_operation.cc
@@ -371,7 +371,7 @@ LocalFileSystemOperation* SyncableFileSystemOperation::NewOperation() {
void SyncableFileSystemOperation::DidFinish(base::PlatformFileError status) {
DCHECK(CalledOnValidThread());
DCHECK(!completion_callback_.is_null());
- if (operation_runner_.get())
+ if (operation_runner_)
operation_runner_->OnOperationCompleted(target_paths_);
completion_callback_.Run(status);
}
@@ -386,7 +386,7 @@ void SyncableFileSystemOperation::DidWrite(
callback.Run(result, bytes, complete);
return;
}
- if (operation_runner_.get())
+ if (operation_runner_)
operation_runner_->OnOperationCompleted(target_paths_);
callback.Run(result, bytes, complete);
}
diff --git a/webkit/glue/resource_fetcher.cc b/webkit/glue/resource_fetcher.cc
index c3d7c84..5d3d229 100644
--- a/webkit/glue/resource_fetcher.cc
+++ b/webkit/glue/resource_fetcher.cc
@@ -37,7 +37,7 @@ ResourceFetcher::ResourceFetcher(const GURL& url, WebFrame* frame,
}
ResourceFetcher::~ResourceFetcher() {
- if (!completed_ && loader_.get())
+ if (!completed_ && loader_)
loader_->cancel();
}
diff --git a/webkit/glue/scoped_clipboard_writer_glue.cc b/webkit/glue/scoped_clipboard_writer_glue.cc
index b16ac04..0aa53a4 100644
--- a/webkit/glue/scoped_clipboard_writer_glue.cc
+++ b/webkit/glue/scoped_clipboard_writer_glue.cc
@@ -18,14 +18,14 @@ ScopedClipboardWriterGlue::ScopedClipboardWriterGlue(
}
ScopedClipboardWriterGlue::~ScopedClipboardWriterGlue() {
- if (!objects_.empty() && context_.get()) {
+ if (!objects_.empty() && context_) {
context_->Flush(objects_);
}
}
void ScopedClipboardWriterGlue::WriteBitmapFromPixels(const void* pixels,
const gfx::Size& size) {
- if (context_.get()) {
+ if (context_) {
context_->WriteBitmapFromPixels(&objects_, pixels, size);
} else {
ScopedClipboardWriter::WriteBitmapFromPixels(pixels, size);
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index 464f018..2145ce3 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -236,7 +236,7 @@ void PopulateURLResponse(
response->setLoadTiming(timing);
}
- if (info.devtools_info.get()) {
+ if (info.devtools_info) {
WebHTTPLoadInfo load_info;
load_info.setHTTPStatusCode(info.devtools_info->http_status_code);
@@ -400,12 +400,12 @@ WebURLLoaderImpl::Context::Context(WebURLLoaderImpl* loader)
void WebURLLoaderImpl::Context::Cancel() {
// The bridge will still send OnCompletedRequest, which will Release() us, so
// we don't do that here.
- if (bridge_.get())
+ if (bridge_)
bridge_->Cancel();
// Ensure that we do not notify the multipart delegate anymore as it has
// its own pointer to the client.
- if (multipart_delegate_.get())
+ if (multipart_delegate_)
multipart_delegate_->Cancel();
// Do not make any further calls to the client.
@@ -414,13 +414,13 @@ void WebURLLoaderImpl::Context::Cancel() {
}
void WebURLLoaderImpl::Context::SetDefersLoading(bool value) {
- if (bridge_.get())
+ if (bridge_)
bridge_->SetDefersLoading(value);
}
void WebURLLoaderImpl::Context::DidChangePriority(
WebURLRequest::Priority new_priority) {
- if (bridge_.get())
+ if (bridge_)
bridge_->DidChangePriority(
ConvertWebKitPriorityToNetPriority(new_priority));
}
@@ -696,11 +696,11 @@ void WebURLLoaderImpl::Context::OnReceivedData(const char* data,
if (!client_)
return;
- if (ftp_listing_delegate_.get()) {
+ if (ftp_listing_delegate_) {
// The FTP listing delegate will make the appropriate calls to
// client_->didReceiveData and client_->didReceiveResponse.
ftp_listing_delegate_->OnReceivedData(data, data_length);
- } else if (multipart_delegate_.get()) {
+ } else if (multipart_delegate_) {
// The multipart delegate will make the appropriate calls to
// client_->didReceiveData and client_->didReceiveResponse.
multipart_delegate_->OnReceivedData(data, data_length, encoded_data_length);
@@ -720,10 +720,10 @@ void WebURLLoaderImpl::Context::OnCompletedRequest(
bool was_ignored_by_handler,
const std::string& security_info,
const base::TimeTicks& completion_time) {
- if (ftp_listing_delegate_.get()) {
+ if (ftp_listing_delegate_) {
ftp_listing_delegate_->OnCompletedRequest();
ftp_listing_delegate_.reset(NULL);
- } else if (multipart_delegate_.get()) {
+ } else if (multipart_delegate_) {
multipart_delegate_->OnCompletedRequest();
multipart_delegate_.reset(NULL);
}
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
index c0d0113..d0311b7 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -381,7 +381,7 @@ GLInProcessContext::Error GLInProcessContext::GetError() {
}
bool GLInProcessContext::IsCommandBufferContextLost() {
- if (context_lost_ || !command_buffer_.get()) {
+ if (context_lost_ || !command_buffer_) {
return true;
}
CommandBuffer::State state = command_buffer_->GetState();
@@ -518,7 +518,7 @@ bool GLInProcessContext::Initialize(
else
surface_ = gfx::GLSurface::CreateViewGLSurface(false, window);
- if (!surface_.get()) {
+ if (!surface_) {
LOG(ERROR) << "Could not create GLSurface.";
Destroy();
return false;
@@ -547,13 +547,13 @@ bool GLInProcessContext::Initialize(
gpu_preference);
}
- if (!context_.get()) {
+ if (!context_) {
LOG(ERROR) << "Could not create GLContext.";
Destroy();
return false;
}
- if (!context_->MakeCurrent(surface_.get())) {
+ if (!context_->MakeCurrent(surface_)) {
LOG(ERROR) << "Could not make context current.";
Destroy();
return false;
@@ -620,7 +620,7 @@ bool GLInProcessContext::Initialize(
void GLInProcessContext::Destroy() {
bool context_lost = IsCommandBufferContextLost();
- if (gles2_implementation_.get()) {
+ if (gles2_implementation_) {
// First flush the context to ensure that any pending frees of resources
// are completed. Otherwise, if this context is part of a share group,
// those resources might leak. Also, any remaining side effects of commands
@@ -637,7 +637,7 @@ void GLInProcessContext::Destroy() {
AutoLockAndDecoderDetachThread lock(g_decoder_lock.Get(),
g_all_shared_contexts.Get());
- if (decoder_.get()) {
+ if (decoder_) {
decoder_->Destroy(!context_lost);
}
@@ -1271,7 +1271,7 @@ bool WebGraphicsContext3DInProcessCommandBufferImpl::getActiveAttrib(
if (max_name_length < 0)
return false;
scoped_ptr<GLchar[]> name(new GLchar[max_name_length]);
- if (!name.get()) {
+ if (!name) {
synthesizeGLError(GL_OUT_OF_MEMORY);
return false;
}
@@ -1298,7 +1298,7 @@ bool WebGraphicsContext3DInProcessCommandBufferImpl::getActiveUniform(
if (max_name_length < 0)
return false;
scoped_ptr<GLchar[]> name(new GLchar[max_name_length]);
- if (!name.get()) {
+ if (!name) {
synthesizeGLError(GL_OUT_OF_MEMORY);
return false;
}
@@ -1366,7 +1366,7 @@ WebKit::WebString WebGraphicsContext3DInProcessCommandBufferImpl::
if (!logLength)
return WebKit::WebString();
scoped_ptr<GLchar[]> log(new GLchar[logLength]);
- if (!log.get())
+ if (!log)
return WebKit::WebString();
GLsizei returnedLogLength = 0;
gl_->GetProgramInfoLog(
@@ -1390,7 +1390,7 @@ WebKit::WebString WebGraphicsContext3DInProcessCommandBufferImpl::
if (!logLength)
return WebKit::WebString();
scoped_ptr<GLchar[]> log(new GLchar[logLength]);
- if (!log.get())
+ if (!log)
return WebKit::WebString();
GLsizei returnedLogLength = 0;
gl_->GetShaderInfoLog(
@@ -1412,7 +1412,7 @@ WebKit::WebString WebGraphicsContext3DInProcessCommandBufferImpl::
if (!logLength)
return WebKit::WebString();
scoped_ptr<GLchar[]> log(new GLchar[logLength]);
- if (!log.get())
+ if (!log)
return WebKit::WebString();
GLsizei returnedLogLength = 0;
gl_->GetShaderSource(
@@ -1434,7 +1434,7 @@ WebKit::WebString WebGraphicsContext3DInProcessCommandBufferImpl::
if (!logLength)
return WebKit::WebString();
scoped_ptr<GLchar[]> log(new GLchar[logLength]);
- if (!log.get())
+ if (!log)
return WebKit::WebString();
GLsizei returnedLogLength = 0;
gl_->GetTranslatedShaderSourceANGLE(
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
index f042781..a668e6c 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
@@ -142,7 +142,7 @@ WebGraphicsContext3DInProcessImpl::CreateForWebView(
scoped_refptr<gfx::GLSurface> gl_surface =
gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1));
- if (!gl_surface.get())
+ if (!gl_surface)
return NULL;
// TODO(kbr): This implementation doesn't yet support lost contexts
@@ -154,7 +154,7 @@ WebGraphicsContext3DInProcessImpl::CreateForWebView(
gl_surface.get(),
gpu_preference);
- if (!gl_context.get())
+ if (!gl_context)
return NULL;
scoped_ptr<WebGraphicsContext3DInProcessImpl> context(
@@ -175,7 +175,7 @@ WebGraphicsContext3DInProcessImpl::CreateForWindow(
scoped_refptr<gfx::GLSurface> gl_surface =
gfx::GLSurface::CreateViewGLSurface(false, window);
- if (!gl_surface.get())
+ if (!gl_surface)
return NULL;
gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
@@ -184,7 +184,7 @@ WebGraphicsContext3DInProcessImpl::CreateForWindow(
share_group,
gl_surface.get(),
gpu_preference);
- if (!gl_context.get())
+ if (!gl_context)
return NULL;
scoped_ptr<WebGraphicsContext3DInProcessImpl> context(
new WebGraphicsContext3DInProcessImpl(
@@ -212,7 +212,7 @@ bool WebGraphicsContext3DInProcessImpl::Initialize(
if (render_directly_to_web_view_)
attributes_.antialias = false;
- if (!gl_context_->MakeCurrent(gl_surface_.get())) {
+ if (!gl_context_->MakeCurrent(gl_surface_)) {
gl_context_ = NULL;
return false;
}
@@ -1293,7 +1293,7 @@ WebString WebGraphicsContext3DInProcessImpl::getShaderInfoLog(WebGLId shader) {
ShaderSourceEntry* entry = result->second;
DCHECK(entry);
if (!entry->is_valid) {
- if (!entry->log.get())
+ if (!entry->log)
return WebString();
WebString res = WebString::fromUTF8(
entry->log.get(), strlen(entry->log.get()));
@@ -1320,7 +1320,7 @@ WebString WebGraphicsContext3DInProcessImpl::getShaderSource(WebGLId shader) {
if (result != shader_source_map_.end()) {
ShaderSourceEntry* entry = result->second;
DCHECK(entry);
- if (!entry->source.get())
+ if (!entry->source)
return WebString();
WebString res = WebString::fromUTF8(
entry->source.get(), strlen(entry->source.get()));
diff --git a/webkit/media/android/webmediaplayer_android.cc b/webkit/media/android/webmediaplayer_android.cc
index 8f0cdb0..3edcbf7 100644
--- a/webkit/media/android/webmediaplayer_android.cc
+++ b/webkit/media/android/webmediaplayer_android.cc
@@ -72,7 +72,7 @@ WebMediaPlayerAndroid::WebMediaPlayerAndroid(
if (manager_)
player_id_ = manager_->RegisterMediaPlayer(this);
- if (stream_texture_factory_.get()) {
+ if (stream_texture_factory_) {
stream_texture_proxy_.reset(stream_texture_factory_->CreateProxy());
stream_id_ = stream_texture_factory_->CreateStreamTexture(&texture_id_);
ReallocateVideoFrame();
diff --git a/webkit/media/buffered_data_source.cc b/webkit/media/buffered_data_source.cc
index 60b3621..67341c5 100644
--- a/webkit/media/buffered_data_source.cc
+++ b/webkit/media/buffered_data_source.cc
@@ -128,7 +128,7 @@ BufferedResourceLoader* BufferedDataSource::CreateResourceLoader(
void BufferedDataSource::set_host(media::DataSourceHost* host) {
DataSource::set_host(host);
- if (loader_.get()) {
+ if (loader_) {
base::AutoLock auto_lock(lock_);
UpdateHostState_Locked();
}
@@ -275,7 +275,7 @@ void BufferedDataSource::StopInternal_Locked() {
void BufferedDataSource::StopLoader() {
DCHECK(render_loop_->BelongsToCurrentThread());
- if (loader_.get())
+ if (loader_)
loader_->Stop();
}
diff --git a/webkit/media/buffered_resource_loader.cc b/webkit/media/buffered_resource_loader.cc
index 8468002..5177c89 100644
--- a/webkit/media/buffered_resource_loader.cc
+++ b/webkit/media/buffered_resource_loader.cc
@@ -178,7 +178,7 @@ void BufferedResourceLoader::Start(
// Check for our test WebURLLoader.
scoped_ptr<WebURLLoader> loader;
- if (test_loader_.get()) {
+ if (test_loader_) {
loader = test_loader_.Pass();
} else {
WebURLLoaderOptions options;
@@ -596,7 +596,7 @@ void BufferedResourceLoader::UpdateBufferWindow() {
}
void BufferedResourceLoader::UpdateDeferBehavior() {
- if (!active_loader_.get())
+ if (!active_loader_)
return;
SetDeferred(ShouldDefer());
@@ -638,7 +638,7 @@ bool BufferedResourceLoader::CanFulfillRead() const {
// At the point, we verified that first byte requested is within the buffer.
// If the request has completed, then just returns with what we have now.
- if (!active_loader_.get())
+ if (!active_loader_)
return true;
// If the resource request is still active, make sure the whole requested
@@ -660,7 +660,7 @@ bool BufferedResourceLoader::WillFulfillRead() const {
// The resource request has completed, there's no way we can fulfill the
// read request.
- if (!active_loader_.get())
+ if (!active_loader_)
return false;
return true;
diff --git a/webkit/media/webmediaplayer_ms.cc b/webkit/media/webmediaplayer_ms.cc
index 50b3e9f..134c809 100644
--- a/webkit/media/webmediaplayer_ms.cc
+++ b/webkit/media/webmediaplayer_ms.cc
@@ -250,7 +250,7 @@ double WebMediaPlayerMS::duration() const {
double WebMediaPlayerMS::currentTime() const {
DCHECK(thread_checker_.CalledOnValidThread());
- if (current_frame_.get()) {
+ if (current_frame_) {
return current_frame_->GetTimestamp().InSecondsF();
} else if (audio_renderer_) {
return audio_renderer_->GetCurrentRenderTime().InSecondsF();
@@ -311,7 +311,7 @@ void WebMediaPlayerMS::paint(WebCanvas* canvas,
{
base::AutoLock auto_lock(current_frame_lock_);
- if (current_frame_.get())
+ if (current_frame_)
current_frame_used_ = true;
}
}
@@ -423,7 +423,7 @@ void WebMediaPlayerMS::OnFrameAvailable(
{
base::AutoLock auto_lock(current_frame_lock_);
- if (!current_frame_used_ && current_frame_.get())
+ if (!current_frame_used_ && current_frame_)
++dropped_frame_count_;
current_frame_ = frame;
current_frame_->SetTimestamp(frame->GetTimestamp() - start_time_);
diff --git a/webkit/plugins/npapi/plugin_host.cc b/webkit/plugins/npapi/plugin_host.cc
index 752fa36..3bb648d 100644
--- a/webkit/plugins/npapi/plugin_host.cc
+++ b/webkit/plugins/npapi/plugin_host.cc
@@ -344,7 +344,7 @@ NPError NPN_RequestRead(NPStream* stream, NPByteRange* range_list) {
scoped_refptr<PluginInstance> plugin(
reinterpret_cast<PluginInstance*>(stream->ndata));
- if (!plugin.get())
+ if (!plugin)
return NPERR_GENERIC_ERROR;
plugin->RequestRead(stream, range_list);
@@ -361,7 +361,7 @@ static NPError GetURLNotify(NPP id,
return NPERR_INVALID_URL;
scoped_refptr<PluginInstance> plugin(FindInstance(id));
- if (!plugin.get()) {
+ if (!plugin) {
return NPERR_GENERIC_ERROR;
}
@@ -425,7 +425,7 @@ static NPError PostURLNotify(NPP id,
return NPERR_INVALID_URL;
scoped_refptr<PluginInstance> plugin(FindInstance(id));
- if (!plugin.get()) {
+ if (!plugin) {
NOTREACHED();
return NPERR_GENERIC_ERROR;
}
@@ -683,7 +683,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
switch (static_cast<int>(variable)) {
case NPNVWindowNPObject: {
scoped_refptr<PluginInstance> plugin(FindInstance(id));
- if (!plugin.get()) {
+ if (!plugin) {
NOTREACHED();
return NPERR_INVALID_INSTANCE_ERROR;
}
@@ -703,7 +703,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
}
case NPNVPluginElementNPObject: {
scoped_refptr<PluginInstance> plugin(FindInstance(id));
- if (!plugin.get()) {
+ if (!plugin) {
NOTREACHED();
return NPERR_INVALID_INSTANCE_ERROR;
}
@@ -724,7 +724,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
#if !defined(OS_MACOSX) // OS X doesn't have windowed plugins.
case NPNVnetscapeWindow: {
scoped_refptr<PluginInstance> plugin = FindInstance(id);
- if (!plugin.get()) {
+ if (!plugin) {
NOTREACHED();
return NPERR_INVALID_INSTANCE_ERROR;
}
@@ -761,7 +761,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
case NPNVprivateModeBool: {
NPBool* private_mode = reinterpret_cast<NPBool*>(value);
scoped_refptr<PluginInstance> plugin(FindInstance(id));
- if (!plugin.get()) {
+ if (!plugin) {
NOTREACHED();
return NPERR_INVALID_INSTANCE_ERROR;
}
@@ -773,7 +773,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
case NPNVpluginDrawingModel: {
// return the drawing model that was negotiated when we initialized.
scoped_refptr<PluginInstance> plugin(FindInstance(id));
- if (!plugin.get()) {
+ if (!plugin) {
NOTREACHED();
return NPERR_INVALID_INSTANCE_ERROR;
}
@@ -836,7 +836,7 @@ NPError NPN_SetValue(NPP id, NPPVariable variable, void* value) {
// Allows the plugin to set various modes
scoped_refptr<PluginInstance> plugin(FindInstance(id));
- if (!plugin.get()) {
+ if (!plugin) {
NOTREACHED();
return NPERR_INVALID_INSTANCE_ERROR;
}
@@ -1072,7 +1072,7 @@ NPError NPN_PopUpContextMenu(NPP id, NPMenu* menu) {
return NPERR_INVALID_PARAM;
scoped_refptr<PluginInstance> plugin(FindInstance(id));
- if (plugin.get()) {
+ if (plugin) {
return plugin->PopUpContextMenu(menu);
}
NOTREACHED();
@@ -1084,7 +1084,7 @@ NPBool NPN_ConvertPoint(NPP id, double sourceX, double sourceY,
double *destX, double *destY,
NPCoordinateSpace destSpace) {
scoped_refptr<PluginInstance> plugin(FindInstance(id));
- if (plugin.get()) {
+ if (plugin) {
return plugin->ConvertPoint(sourceX, sourceY, sourceSpace,
destX, destY, destSpace);
}
@@ -1106,7 +1106,7 @@ NPBool NPN_UnfocusInstance(NPP id, NPFocusDirection direction) {
void NPN_URLRedirectResponse(NPP instance, void* notify_data, NPBool allow) {
scoped_refptr<PluginInstance> plugin(FindInstance(instance));
- if (plugin.get()) {
+ if (plugin) {
plugin->URLRedirectResponse(!!allow, notify_data);
}
}
diff --git a/webkit/plugins/npapi/plugin_lib_win.cc b/webkit/plugins/npapi/plugin_lib_win.cc
index 8a0f6cc..ef5ff28 100644
--- a/webkit/plugins/npapi/plugin_lib_win.cc
+++ b/webkit/plugins/npapi/plugin_lib_win.cc
@@ -24,7 +24,7 @@ bool PluginLib::ReadWebPluginInfo(const base::FilePath &filename,
// video/quicktime|audio/aiff|image/jpeg
scoped_ptr<FileVersionInfo> version_info(
FileVersionInfo::CreateFileVersionInfo(filename));
- if (!version_info.get()) {
+ if (!version_info) {
LOG_IF(ERROR, PluginList::DebugPluginLoading())
<< "Could not get version info for plugin "
<< filename.value();
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
index e213365..01c8a57 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
@@ -262,7 +262,7 @@ bool WebPluginDelegateImpl::PlatformInitialize() {
}
void WebPluginDelegateImpl::PlatformDestroyInstance() {
- if (redraw_timer_.get())
+ if (redraw_timer_)
redraw_timer_->Stop();
[renderer_ release];
renderer_ = nil;
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc
index 9739ca6..717dbc5 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc
@@ -1284,7 +1284,7 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent(
// Allow this plug-in to access this IME emulator through IMM32 API while the
// plug-in is processing this event.
if (GetQuirks() & PLUGIN_QUIRK_EMULATE_IME) {
- if (!plugin_ime_.get())
+ if (!plugin_ime_)
plugin_ime_.reset(new WebPluginIMEWin);
}
WebPluginIMEWin::ScopedLock lock(
@@ -1485,7 +1485,7 @@ void WebPluginDelegateImpl::ImeCompositionUpdated(
const std::vector<int>& clauses,
const std::vector<int>& target,
int cursor_position) {
- if (!plugin_ime_.get())
+ if (!plugin_ime_)
plugin_ime_.reset(new WebPluginIMEWin);
plugin_ime_->CompositionUpdated(text, clauses, target, cursor_position);
@@ -1494,7 +1494,7 @@ void WebPluginDelegateImpl::ImeCompositionUpdated(
void WebPluginDelegateImpl::ImeCompositionCompleted(
const base::string16& text) {
- if (!plugin_ime_.get())
+ if (!plugin_ime_)
plugin_ime_.reset(new WebPluginIMEWin);
plugin_ime_->CompositionCompleted(text);
plugin_ime_->SendEvents(instance());
@@ -1502,7 +1502,7 @@ void WebPluginDelegateImpl::ImeCompositionCompleted(
bool WebPluginDelegateImpl::GetIMEStatus(int* input_type,
gfx::Rect* caret_rect) {
- if (!plugin_ime_.get())
+ if (!plugin_ime_)
return false;
return plugin_ime_->GetStatus(input_type, caret_rect);
}
diff --git a/webkit/plugins/npapi/webplugin_impl.cc b/webkit/plugins/npapi/webplugin_impl.cc
index 494eaee..880cb97 100644
--- a/webkit/plugins/npapi/webplugin_impl.cc
+++ b/webkit/plugins/npapi/webplugin_impl.cc
@@ -786,7 +786,7 @@ void WebPluginImpl::AcceleratedPluginSwappedIOSurface() {
// through. More investigation is needed. http://crbug.com/105346
if (next_io_surface_allocated_) {
if (next_io_surface_id_) {
- if (!io_surface_layer_.get()) {
+ if (!io_surface_layer_) {
io_surface_layer_ = cc::IOSurfaceLayer::Create();
web_layer_.reset(new webkit::WebLayerImpl(io_surface_layer_));
container_->setWebLayer(web_layer_.get());
diff --git a/webkit/plugins/ppapi/audio_helper.cc b/webkit/plugins/ppapi/audio_helper.cc
index f7ad230..c2357f3 100644
--- a/webkit/plugins/ppapi/audio_helper.cc
+++ b/webkit/plugins/ppapi/audio_helper.cc
@@ -21,7 +21,7 @@ AudioHelper::~AudioHelper() {
}
int32_t AudioHelper::GetSyncSocketImpl(int* sync_socket) {
- if (socket_for_create_callback_.get()) {
+ if (socket_for_create_callback_) {
#if defined(OS_POSIX)
*sync_socket = socket_for_create_callback_->handle();
#elif defined(OS_WIN)
@@ -35,7 +35,7 @@ int32_t AudioHelper::GetSyncSocketImpl(int* sync_socket) {
}
int32_t AudioHelper::GetSharedMemoryImpl(int* shm_handle, uint32_t* shm_size) {
- if (shared_memory_for_create_callback_.get()) {
+ if (shared_memory_for_create_callback_) {
#if defined(OS_POSIX)
*shm_handle = shared_memory_for_create_callback_->handle().fd;
#elif defined(OS_WIN)
diff --git a/webkit/plugins/ppapi/host_array_buffer_var.cc b/webkit/plugins/ppapi/host_array_buffer_var.cc
index e3d06a5..b28691b 100644
--- a/webkit/plugins/ppapi/host_array_buffer_var.cc
+++ b/webkit/plugins/ppapi/host_array_buffer_var.cc
@@ -67,7 +67,7 @@ bool HostArrayBufferVar::CopyToNewShmem(
webkit::ppapi::HostGlobals::Get()->GetInstance(instance);
scoped_ptr<base::SharedMemory> shm(i->delegate()->CreateAnonymousSharedMemory(
ByteLength()));
- if (!shm.get())
+ if (!shm)
return false;
shm->Map(ByteLength());
diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc
index 4835c6a..b029b62 100644
--- a/webkit/plugins/ppapi/plugin_module.cc
+++ b/webkit/plugins/ppapi/plugin_module.cc
@@ -544,7 +544,7 @@ bool PluginModule::IsProxied() const {
}
base::ProcessId PluginModule::GetPeerProcessId() {
- if (out_of_process_proxy_.get())
+ if (out_of_process_proxy_)
return out_of_process_proxy_->GetPeerProcessId();
return base::kNullProcessId;
}
@@ -574,7 +574,7 @@ PluginInstance* PluginModule::CreateInstance(
LOG(WARNING) << "Plugin doesn't support instance interface, failing.";
return NULL;
}
- if (out_of_process_proxy_.get())
+ if (out_of_process_proxy_)
out_of_process_proxy_->AddInstance(instance->pp_instance());
return instance;
}
@@ -587,7 +587,7 @@ PluginInstance* PluginModule::GetSomeInstance() const {
}
const void* PluginModule::GetPluginInterface(const char* name) const {
- if (out_of_process_proxy_.get())
+ if (out_of_process_proxy_)
return out_of_process_proxy_->GetProxiedInterface(name);
// In-process plugins.
@@ -601,7 +601,7 @@ void PluginModule::InstanceCreated(PluginInstance* instance) {
}
void PluginModule::InstanceDeleted(PluginInstance* instance) {
- if (out_of_process_proxy_.get())
+ if (out_of_process_proxy_)
out_of_process_proxy_->RemoveInstance(instance->pp_instance());
instances_.erase(instance);
}
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index d8cd91c..379d18d 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -424,7 +424,7 @@ PluginInstance::~PluginInstance() {
delegate_->InstanceDeleted(this);
module_->InstanceDeleted(this);
// If we switched from the NaCl plugin module, notify it too.
- if (original_module_.get())
+ if (original_module_)
original_module_->InstanceDeleted(this);
// This should be last since some of the above "instance deleted" calls will
@@ -449,7 +449,7 @@ void PluginInstance::Delete() {
// If this is a NaCl plugin instance, shut down the NaCl plugin by calling
// its DidDestroy. Don't call DidDestroy on the untrusted plugin instance,
// since there is little that it can do at this point.
- if (original_instance_interface_.get())
+ if (original_instance_interface_)
original_instance_interface_->DidDestroy(pp_instance());
else
instance_interface_->DidDestroy(pp_instance());
@@ -517,7 +517,7 @@ void PluginInstance::ScrollRect(int dx, int dy, const gfx::Rect& rect) {
}
unsigned PluginInstance::GetBackingTextureId() {
- if (bound_graphics_3d_.get())
+ if (bound_graphics_3d_)
return bound_graphics_3d_->GetBackingTextureId();
return 0;
@@ -808,7 +808,7 @@ bool PluginInstance::HandleInputEvent(const WebKit::WebInputEvent& event,
}
}
- if (cursor_.get())
+ if (cursor_)
*cursor_info = *cursor_;
return rv;
}
@@ -922,14 +922,14 @@ void PluginInstance::PageVisibilityChanged(bool is_visible) {
void PluginInstance::ViewWillInitiatePaint() {
if (GetBoundGraphics2D())
GetBoundGraphics2D()->ViewWillInitiatePaint();
- else if (bound_graphics_3d_.get())
+ else if (bound_graphics_3d_)
bound_graphics_3d_->ViewWillInitiatePaint();
}
void PluginInstance::ViewInitiatedPaint() {
if (GetBoundGraphics2D())
GetBoundGraphics2D()->ViewInitiatedPaint();
- else if (bound_graphics_3d_.get())
+ else if (bound_graphics_3d_)
bound_graphics_3d_->ViewInitiatedPaint();
}
@@ -938,7 +938,7 @@ void PluginInstance::ViewFlushedPaint() {
scoped_refptr<PluginInstance> ref(this);
if (GetBoundGraphics2D())
GetBoundGraphics2D()->ViewFlushedPaint();
- else if (bound_graphics_3d_.get())
+ else if (bound_graphics_3d_)
bound_graphics_3d_->ViewFlushedPaint();
}
@@ -1884,7 +1884,7 @@ PP_Bool PluginInstance::BindGraphics(PP_Instance instance,
// The Graphics3D instance can't be destroyed until we call
// UpdateLayer().
scoped_refptr< ::ppapi::Resource> old_graphics = bound_graphics_3d_.get();
- if (bound_graphics_3d_.get()) {
+ if (bound_graphics_3d_) {
bound_graphics_3d_->BindToInstance(false);
bound_graphics_3d_ = NULL;
}
diff --git a/webkit/plugins/ppapi/ppb_file_ref_impl.cc b/webkit/plugins/ppapi/ppb_file_ref_impl.cc
index 653c4c2..736f2b5 100644
--- a/webkit/plugins/ppapi/ppb_file_ref_impl.cc
+++ b/webkit/plugins/ppapi/ppb_file_ref_impl.cc
@@ -233,7 +233,7 @@ PP_Resource PPB_FileRef_Impl::GetParent() {
scoped_refptr<PPB_FileRef_Impl> parent_ref(
CreateInternal(pp_instance(), file_system_, parent_path));
- if (!parent_ref.get())
+ if (!parent_ref)
return 0;
return parent_ref->GetReference();
}
@@ -313,7 +313,7 @@ int32_t PPB_FileRef_Impl::Rename(PP_Resource new_pp_file_ref,
PP_Var PPB_FileRef_Impl::GetAbsolutePath() {
if (GetFileSystemType() != PP_FILESYSTEMTYPE_EXTERNAL)
return GetPath();
- if (!external_path_var_.get()) {
+ if (!external_path_var_) {
external_path_var_ = new StringVar(
external_file_system_path_.AsUTF8Unsafe());
}
@@ -380,7 +380,7 @@ int32_t PPB_FileRef_Impl::QueryInHost(
scoped_refptr<TrackedCallback> callback) {
scoped_refptr<PluginInstance> plugin_instance =
ResourceHelper::GetPluginInstance(this);
- if (!plugin_instance.get())
+ if (!plugin_instance)
return PP_ERROR_FAILED;
if (!file_system_) {
diff --git a/webkit/plugins/ppapi/ppb_graphics_3d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_3d_impl.cc
index a0b203a..433881e 100644
--- a/webkit/plugins/ppapi/ppb_graphics_3d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_graphics_3d_impl.cc
@@ -270,7 +270,7 @@ bool PPB_Graphics3D_Impl::InitRaw(PPB_Graphics3D_API* share_context,
}
platform_context_.reset(plugin_instance->CreateContext3D());
- if (!platform_context_.get())
+ if (!platform_context_)
return false;
if (!platform_context_->Init(attrib_list, share_platform_context))
diff --git a/webkit/plugins/ppapi/ppb_image_data_impl.cc b/webkit/plugins/ppapi/ppb_image_data_impl.cc
index 8e2951c..aaaf7a2 100644
--- a/webkit/plugins/ppapi/ppb_image_data_impl.cc
+++ b/webkit/plugins/ppapi/ppb_image_data_impl.cc
@@ -167,9 +167,9 @@ ImageDataPlatformBackend::PlatformImage() const {
}
void* ImageDataPlatformBackend::Map() {
- if (!mapped_canvas_.get()) {
+ if (!mapped_canvas_) {
mapped_canvas_.reset(platform_image_->Map());
- if (!mapped_canvas_.get())
+ if (!mapped_canvas_)
return NULL;
}
const SkBitmap& bitmap =
@@ -204,7 +204,7 @@ SkCanvas* ImageDataPlatformBackend::GetCanvas() {
}
const SkBitmap* ImageDataPlatformBackend::GetMappedBitmap() const {
- if (!mapped_canvas_.get())
+ if (!mapped_canvas_)
return NULL;
return &skia::GetTopDevice(*mapped_canvas_)->accessBitmap(false);
}
diff --git a/webkit/plugins/ppapi/ppb_scrollbar_impl.cc b/webkit/plugins/ppapi/ppb_scrollbar_impl.cc
index fee5df6..50fe5c9 100644
--- a/webkit/plugins/ppapi/ppb_scrollbar_impl.cc
+++ b/webkit/plugins/ppapi/ppb_scrollbar_impl.cc
@@ -83,18 +83,18 @@ uint32_t PPB_Scrollbar_Impl::GetValue() {
}
void PPB_Scrollbar_Impl::SetValue(uint32_t value) {
- if (scrollbar_.get())
+ if (scrollbar_)
scrollbar_->setValue(value);
}
void PPB_Scrollbar_Impl::SetDocumentSize(uint32_t size) {
- if (scrollbar_.get())
+ if (scrollbar_)
scrollbar_->setDocumentSize(size);
}
void PPB_Scrollbar_Impl::SetTickMarks(const PP_Rect* tick_marks,
uint32_t count) {
- if (!scrollbar_.get())
+ if (!scrollbar_)
return;
tickmarks_.resize(count);
for (uint32 i = 0; i < count; ++i) {
@@ -108,7 +108,7 @@ void PPB_Scrollbar_Impl::SetTickMarks(const PP_Rect* tick_marks,
}
void PPB_Scrollbar_Impl::ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) {
- if (!scrollbar_.get())
+ if (!scrollbar_)
return;
WebScrollbar::ScrollDirection direction = multiplier >= 0 ?
@@ -135,7 +135,7 @@ PP_Bool PPB_Scrollbar_Impl::PaintInternal(const gfx::Rect& rect,
PPB_ImageData_Impl* image) {
ImageDataAutoMapper mapper(image);
skia::PlatformCanvas* canvas = image->GetPlatformCanvas();
- if (!canvas || !scrollbar_.get())
+ if (!canvas || !scrollbar_)
return PP_FALSE;
canvas->save();
canvas->scale(scale(), scale());
@@ -153,14 +153,14 @@ PP_Bool PPB_Scrollbar_Impl::PaintInternal(const gfx::Rect& rect,
PP_Bool PPB_Scrollbar_Impl::HandleEventInternal(
const ::ppapi::InputEventData& data) {
scoped_ptr<WebInputEvent> web_input_event(CreateWebInputEvent(data));
- if (!web_input_event.get() || !scrollbar_.get())
+ if (!web_input_event.get() || !scrollbar_)
return PP_FALSE;
return PP_FromBool(scrollbar_->handleInputEvent(*web_input_event.get()));
}
void PPB_Scrollbar_Impl::SetLocationInternal(const PP_Rect* location) {
- if (!scrollbar_.get())
+ if (!scrollbar_)
return;
scrollbar_->setLocation(WebRect(location->point.x,
location->point.y,
diff --git a/webkit/plugins/ppapi/ppb_url_loader_impl.cc b/webkit/plugins/ppapi/ppb_url_loader_impl.cc
index f91d28e..0b0869d 100644
--- a/webkit/plugins/ppapi/ppb_url_loader_impl.cc
+++ b/webkit/plugins/ppapi/ppb_url_loader_impl.cc
@@ -141,7 +141,7 @@ int32_t PPB_URLLoader_Impl::Open(
return PP_ERROR_NOACCESS;
}
- if (loader_.get())
+ if (loader_)
return PP_ERROR_INPROGRESS;
WebFrame* frame = GetFrameForResource(this);
@@ -179,7 +179,7 @@ int32_t PPB_URLLoader_Impl::Open(
is_asynchronous_load_suspended_ = false;
loader_.reset(frame->createAssociatedURLLoader(options));
- if (!loader_.get())
+ if (!loader_)
return PP_ERROR_FAILED;
loader_->loadAsynchronously(web_request, this);
@@ -227,7 +227,7 @@ PP_Bool PPB_URLLoader_Impl::GetDownloadProgress(
PP_Resource PPB_URLLoader_Impl::GetResponseInfo() {
::ppapi::thunk::EnterResourceCreationNoLock enter(pp_instance());
- if (enter.failed() || !response_info_.get())
+ if (enter.failed() || !response_info_)
return 0;
// Since we're the "host" the process-local resource for the file ref is
@@ -295,7 +295,7 @@ int32_t PPB_URLLoader_Impl::FinishStreamingToFile(
}
void PPB_URLLoader_Impl::Close() {
- if (loader_.get())
+ if (loader_)
loader_->cancel();
else if (main_document_loader_)
GetFrameForResource(this)->stopLoading();
@@ -318,7 +318,7 @@ void PPB_URLLoader_Impl::RegisterStatusCallback(
bool PPB_URLLoader_Impl::GetResponseInfoData(
::ppapi::URLResponseInfoData* data) {
- if (!response_info_.get())
+ if (!response_info_)
return false;
*data = *response_info_;
@@ -429,7 +429,7 @@ void PPB_URLLoader_Impl::didFail(WebURLLoader* loader,
}
void PPB_URLLoader_Impl::SetDefersLoading(bool defers_loading) {
- if (loader_.get()) {
+ if (loader_) {
loader_->setDefersLoading(defers_loading);
is_asynchronous_load_suspended_ = defers_loading;
}
@@ -472,7 +472,7 @@ void PPB_URLLoader_Impl::RegisterCallback(
void PPB_URLLoader_Impl::RunCallback(int32_t result) {
// This may be null only when this is a main document loader.
- if (!pending_callback_.get()) {
+ if (!pending_callback_) {
CHECK(main_document_loader_);
return;
}
diff --git a/webkit/plugins/ppapi/ppb_video_decoder_impl.cc b/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
index f8d5688..4165377 100644
--- a/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
+++ b/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
@@ -144,7 +144,7 @@ bool PPB_VideoDecoder_Impl::Init(
platform_video_decoder_.reset(plugin_delegate->CreateVideoDecoder(
this, command_buffer_route_id));
- if (!platform_video_decoder_.get())
+ if (!platform_video_decoder_)
return false;
FlushCommandBuffer();
@@ -154,7 +154,7 @@ bool PPB_VideoDecoder_Impl::Init(
int32_t PPB_VideoDecoder_Impl::Decode(
const PP_VideoBitstreamBuffer_Dev* bitstream_buffer,
scoped_refptr<TrackedCallback> callback) {
- if (!platform_video_decoder_.get())
+ if (!platform_video_decoder_)
return PP_ERROR_BADRESOURCE;
EnterResourceNoLock<PPB_Buffer_API> enter(bitstream_buffer->data, true);
@@ -178,7 +178,7 @@ int32_t PPB_VideoDecoder_Impl::Decode(
void PPB_VideoDecoder_Impl::AssignPictureBuffers(
uint32_t no_of_buffers,
const PP_PictureBuffer_Dev* buffers) {
- if (!platform_video_decoder_.get())
+ if (!platform_video_decoder_)
return;
UMA_HISTOGRAM_COUNTS_100("Media.PepperVideoDecoderPictureCount",
no_of_buffers);
@@ -201,7 +201,7 @@ void PPB_VideoDecoder_Impl::AssignPictureBuffers(
}
void PPB_VideoDecoder_Impl::ReusePictureBuffer(int32_t picture_buffer_id) {
- if (!platform_video_decoder_.get())
+ if (!platform_video_decoder_)
return;
FlushCommandBuffer();
@@ -209,7 +209,7 @@ void PPB_VideoDecoder_Impl::ReusePictureBuffer(int32_t picture_buffer_id) {
}
int32_t PPB_VideoDecoder_Impl::Flush(scoped_refptr<TrackedCallback> callback) {
- if (!platform_video_decoder_.get())
+ if (!platform_video_decoder_)
return PP_ERROR_BADRESOURCE;
if (!SetFlushCallback(callback))
@@ -221,7 +221,7 @@ int32_t PPB_VideoDecoder_Impl::Flush(scoped_refptr<TrackedCallback> callback) {
}
int32_t PPB_VideoDecoder_Impl::Reset(scoped_refptr<TrackedCallback> callback) {
- if (!platform_video_decoder_.get())
+ if (!platform_video_decoder_)
return PP_ERROR_BADRESOURCE;
if (!SetResetCallback(callback))
diff --git a/webkit/plugins/webview_plugin.cc b/webkit/plugins/webview_plugin.cc
index b75a6d9..08a16ad 100644
--- a/webkit/plugins/webview_plugin.cc
+++ b/webkit/plugins/webview_plugin.cc
@@ -82,7 +82,7 @@ void WebViewPlugin::ReplayReceivedData(WebPlugin* plugin) {
if (finished_loading_) {
plugin->didFinishLoading();
}
- if (error_.get()) {
+ if (error_) {
plugin->didFailLoading(*error_);
}
}
diff --git a/webkit/quota/quota_database.cc b/webkit/quota/quota_database.cc
index aeac443..e95b818 100644
--- a/webkit/quota/quota_database.cc
+++ b/webkit/quota/quota_database.cc
@@ -128,7 +128,7 @@ QuotaDatabase::QuotaDatabase(const base::FilePath& path)
}
QuotaDatabase::~QuotaDatabase() {
- if (db_.get()) {
+ if (db_) {
db_->CommitTransaction();
}
}
@@ -391,7 +391,7 @@ bool QuotaDatabase::SetOriginDatabaseBootstrapped(bool bootstrap_flag) {
}
void QuotaDatabase::Commit() {
- if (!db_.get())
+ if (!db_)
return;
if (timer_.IsRunning())
@@ -430,7 +430,7 @@ bool QuotaDatabase::FindOriginUsedCount(
}
bool QuotaDatabase::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/quota/quota_manager.cc b/webkit/quota/quota_manager.cc
index 761954a..387b577 100644
--- a/webkit/quota/quota_manager.cc
+++ b/webkit/quota/quota_manager.cc
@@ -1191,7 +1191,7 @@ void QuotaManager::GetHostUsage(const std::string& host,
void QuotaManager::GetStatistics(
std::map<std::string, std::string>* statistics) {
DCHECK(statistics);
- if (temporary_storage_evictor_.get()) {
+ if (temporary_storage_evictor_) {
std::map<std::string, int64> stats;
temporary_storage_evictor_->GetStatistics(&stats);
for (std::map<std::string, int64>::iterator p = stats.begin();
@@ -1259,7 +1259,7 @@ QuotaManager::~QuotaManager() {
proxy_->manager_ = NULL;
std::for_each(clients_.begin(), clients_.end(),
std::mem_fun(&QuotaClient::OnQuotaManagerDestroyed));
- if (database_.get())
+ if (database_)
db_thread_->DeleteSoon(FROM_HERE, database_.release());
}
@@ -1272,7 +1272,7 @@ QuotaManager::EvictionContext::~EvictionContext() {
void QuotaManager::LazyInitialize() {
DCHECK(io_thread_->BelongsToCurrentThread());
- if (database_.get()) {
+ if (database_) {
// Initialization seems to be done already.
return;
}
diff --git a/webkit/tools/test_shell/simple_dom_storage_system.cc b/webkit/tools/test_shell/simple_dom_storage_system.cc
index 05eb07ec..614dfb9 100644
--- a/webkit/tools/test_shell/simple_dom_storage_system.cc
+++ b/webkit/tools/test_shell/simple_dom_storage_system.cc
@@ -40,7 +40,7 @@ class SimpleDomStorageSystem::NamespaceImpl : public WebStorageNamespace {
private:
DomStorageContext* Context() {
- if (!parent_.get())
+ if (!parent_)
return NULL;
return parent_->context_.get();
}
@@ -65,7 +65,7 @@ class SimpleDomStorageSystem::AreaImpl : public WebStorageArea {
private:
DomStorageHost* Host() {
- if (!parent_.get())
+ if (!parent_)
return NULL;
return parent_->host_.get();
}
diff --git a/webkit/tools/test_shell/simple_file_system.cc b/webkit/tools/test_shell/simple_file_system.cc
index b3954c7..8b23259 100644
--- a/webkit/tools/test_shell/simple_file_system.cc
+++ b/webkit/tools/test_shell/simple_file_system.cc
@@ -91,7 +91,7 @@ void SimpleFileSystem::OpenFileSystem(
WebKit::WebFileSystemType type,
long long, bool create,
WebFileSystemCallbacks* callbacks) {
- if (!frame || !file_system_context_.get()) {
+ if (!frame || !file_system_context_) {
// The FileSystem temp directory was not initialized successfully.
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
@@ -107,7 +107,7 @@ void SimpleFileSystem::DeleteFileSystem(
WebFrame* frame,
WebKit::WebFileSystemType type,
WebFileSystemCallbacks* callbacks) {
- if (!frame || !file_system_context_.get()) {
+ if (!frame || !file_system_context_) {
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
}
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
index 69f2011..f0d1b25 100644
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
@@ -500,7 +500,7 @@ class RequestProxy
void AsyncCancel() {
// This can be null in cases where the request is already done.
- if (!request_.get())
+ if (!request_)
return;
request_->Cancel();
@@ -510,7 +510,7 @@ class RequestProxy
void AsyncFollowDeferredRedirect(bool has_new_first_party_for_cookies,
const GURL& new_first_party_for_cookies) {
// This can be null in cases where the request is already done.
- if (!request_.get())
+ if (!request_)
return;
if (has_new_first_party_for_cookies)
@@ -520,7 +520,7 @@ class RequestProxy
void AsyncReadData() {
// This can be null in cases where the request is already done.
- if (!request_.get())
+ if (!request_)
return;
if (request_->status().is_success()) {
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 192c6b5..457ac85 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -157,7 +157,7 @@ TestShell::~TestShell() {
// DevTools frontend page is supposed to be navigated only once and
// loading another URL in that Page is an error.
- if (!dev_tools_client_.get()) {
+ if (!dev_tools_client_) {
// Navigate to an empty page to fire all the destruction logic for the
// current page.
LoadURL(GURL("about:blank"));
@@ -485,7 +485,7 @@ void TestShell::SizeToDefault() {
void TestShell::ResetTestController() {
notification_presenter_->Reset();
delegate_->Reset();
- if (geolocation_client_mock_.get())
+ if (geolocation_client_mock_)
geolocation_client_mock_->resetMock();
}
@@ -599,7 +599,7 @@ void TestShell::SetFocus(WebWidgetHost* host, bool enable) {
WebKit::WebDeviceOrientationClientMock*
TestShell::device_orientation_client_mock() {
- if (!device_orientation_client_mock_.get()) {
+ if (!device_orientation_client_mock_) {
device_orientation_client_mock_.reset(
WebKit::WebDeviceOrientationClientMock::create());
}
@@ -607,7 +607,7 @@ TestShell::device_orientation_client_mock() {
}
WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() {
- if (!geolocation_client_mock_.get()) {
+ if (!geolocation_client_mock_) {
geolocation_client_mock_.reset(
WebKit::WebGeolocationClientMock::create());
}
diff --git a/webkit/tools/test_shell/test_webview_delegate_mac.mm b/webkit/tools/test_shell/test_webview_delegate_mac.mm
index f7e58dff4..f7f676b 100644
--- a/webkit/tools/test_shell/test_webview_delegate_mac.mm
+++ b/webkit/tools/test_shell/test_webview_delegate_mac.mm
@@ -94,7 +94,7 @@ WebWidget* TestWebViewDelegate::createPopupMenu(
// WebWidgetClient ------------------------------------------------------------
void TestWebViewDelegate::show(WebNavigationPolicy policy) {
- if (!popup_menu_info_.get())
+ if (!popup_menu_info_)
return;
if (this != shell_->popup_delegate())
return;
diff --git a/webkit/tools/test_shell/webwidget_host_gtk.cc b/webkit/tools/test_shell/webwidget_host_gtk.cc
index 0807d53..593f1d5 100644
--- a/webkit/tools/test_shell/webwidget_host_gtk.cc
+++ b/webkit/tools/test_shell/webwidget_host_gtk.cc
@@ -354,12 +354,12 @@ void WebWidgetHost::Paint() {
gfx::Rect client_rect(width, height);
// Allocate a canvas if necessary
- if (!canvas_.get()) {
+ if (!canvas_) {
ResetScrollRect();
paint_rect_ = client_rect;
canvas_.reset(skia::CreatePlatformCanvas(width, height, true, 0,
skia::RETURN_NULL_ON_FAILURE));
- if (!canvas_.get()) {
+ if (!canvas_) {
// memory allocation failed, we can't paint.
LOG(ERROR) << "Failed to allocate memory for " << width << "x" << height;
return;
diff --git a/webkit/tools/test_shell/webwidget_host_mac.mm b/webkit/tools/test_shell/webwidget_host_mac.mm
index d96da26..c7d4a54 100644
--- a/webkit/tools/test_shell/webwidget_host_mac.mm
+++ b/webkit/tools/test_shell/webwidget_host_mac.mm
@@ -170,7 +170,7 @@ void WebWidgetHost::Paint() {
CGContextRef context = static_cast<CGContextRef>([view_context graphicsPort]);
// Allocate a canvas if necessary
- if (!canvas_.get()) {
+ if (!canvas_) {
ResetScrollRect();
paint_rect_ = client_rect;
canvas_.reset(skia::CreatePlatformCanvas(
diff --git a/webkit/tools/test_shell/webwidget_host_win.cc b/webkit/tools/test_shell/webwidget_host_win.cc
index 4df7da0..25ca05b 100644
--- a/webkit/tools/test_shell/webwidget_host_win.cc
+++ b/webkit/tools/test_shell/webwidget_host_win.cc
@@ -235,7 +235,7 @@ void WebWidgetHost::Paint() {
gfx::Rect client_rect(r);
// Allocate a canvas if necessary
- if (!canvas_.get()) {
+ if (!canvas_) {
ResetScrollRect();
paint_rect_ = client_rect;
canvas_.reset(skia::CreatePlatformCanvas(