Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Unified Diff: ppapi/proxy/file_io_resource.cc

Issue 467303005: Remove implicit conversions from scoped_refptr to T* in ppapi/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/nacl_irt/manifest_service.cc ('k') | ppapi/proxy/message_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/file_io_resource.cc
diff --git a/ppapi/proxy/file_io_resource.cc b/ppapi/proxy/file_io_resource.cc
index 29335ba90f49f9066e36aca2ee48739d64fda990..e119dd5c621d51d49865b8339b6134acb3d3113e 100644
--- a/ppapi/proxy/file_io_resource.cc
+++ b/ppapi/proxy/file_io_resource.cc
@@ -49,7 +49,7 @@ namespace proxy {
FileIOResource::QueryOp::QueryOp(scoped_refptr<FileHolder> file_holder)
: file_holder_(file_holder) {
- DCHECK(file_holder_);
+ DCHECK(file_holder_.get());
dmichael (off chromium) 2014/08/25 19:55:12 I thought there was (or would be) a reasonable con
dcheng 2014/08/25 19:56:39 Unfortunately, it's not possible to add a boolean
}
FileIOResource::QueryOp::~QueryOp() {
@@ -65,7 +65,7 @@ FileIOResource::ReadOp::ReadOp(scoped_refptr<FileHolder> file_holder,
: file_holder_(file_holder),
offset_(offset),
bytes_to_read_(bytes_to_read) {
- DCHECK(file_holder_);
+ DCHECK(file_holder_.get());
}
FileIOResource::ReadOp::~ReadOp() {
@@ -397,7 +397,7 @@ void FileIOResource::Close() {
pp_resource());
}
- if (file_holder_)
+ if (file_holder_.get())
file_holder_ = NULL;
Post(BROWSER, PpapiHostMsg_FileIO_Close(
@@ -428,7 +428,7 @@ FileIOResource::FileHolder::FileHolder(PP_FileHandle file_handle)
// static
bool FileIOResource::FileHolder::IsValid(
const scoped_refptr<FileIOResource::FileHolder>& handle) {
- return handle && handle->file_.IsValid();
+ return handle.get() && handle->file_.IsValid();
}
FileIOResource::FileHolder::~FileHolder() {
« no previous file with comments | « ppapi/nacl_irt/manifest_service.cc ('k') | ppapi/proxy/message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698