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

Unified Diff: ppapi/proxy/ppb_url_loader_proxy.cc

Issue 4659001: Convert Chrome PPAPI proxy from bool to PP_Bool. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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
Index: ppapi/proxy/ppb_url_loader_proxy.cc
===================================================================
--- ppapi/proxy/ppb_url_loader_proxy.cc (revision 65343)
+++ ppapi/proxy/ppb_url_loader_proxy.cc (working copy)
@@ -75,9 +75,9 @@
return result;
}
-bool IsURLLoader(PP_Resource resource) {
+PP_Bool IsURLLoader(PP_Resource resource) {
URLLoader* object = PluginResource::GetAs<URLLoader>(resource);
- return !!object;
+ return BoolToPPBool(!!object);
}
int32_t Open(PP_Resource loader_id,
@@ -99,32 +99,32 @@
return PP_ERROR_WOULDBLOCK;
}
-bool GetUploadProgress(PP_Resource loader_id,
- int64_t* bytes_sent,
- int64_t* total_bytes_to_be_sent) {
+PP_Bool GetUploadProgress(PP_Resource loader_id,
+ int64_t* bytes_sent,
+ int64_t* total_bytes_to_be_sent) {
URLLoader* object = PluginResource::GetAs<URLLoader>(loader_id);
if (!object || object->bytes_sent_ == -1) {
*bytes_sent = 0;
*total_bytes_to_be_sent = 0;
- return false;
+ return PP_FALSE;
}
*bytes_sent = object->bytes_sent_;
*total_bytes_to_be_sent = object->total_bytes_to_be_sent_;
- return true;
+ return PP_TRUE;
}
-bool GetDownloadProgress(PP_Resource loader_id,
- int64_t* bytes_received,
- int64_t* total_bytes_to_be_received) {
+PP_Bool GetDownloadProgress(PP_Resource loader_id,
+ int64_t* bytes_received,
+ int64_t* total_bytes_to_be_received) {
URLLoader* object = PluginResource::GetAs<URLLoader>(loader_id);
if (!object || object->bytes_received_ == -1) {
*bytes_received = 0;
*total_bytes_to_be_received = 0;
- return false;
+ return PP_FALSE;
}
*bytes_received = object->bytes_received_;
*total_bytes_to_be_received = object->total_bytes_to_be_received_;
- return true;
+ return PP_TRUE;
}
PP_Resource GetResponseInfo(PP_Resource loader_id) {

Powered by Google App Engine
This is Rietveld 408576698