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

Unified Diff: ppapi/proxy/url_loader_resource.cc

Issue 2507023007: PPAPI: properly track asynchronous load state in URLLoaderResource. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/url_loader_resource.cc
diff --git a/ppapi/proxy/url_loader_resource.cc b/ppapi/proxy/url_loader_resource.cc
index 4ac345a2b80686797fd177c4425b32a83336de34..2f520d7684ccc58135100331c529fb3a936ca225 100644
--- a/ppapi/proxy/url_loader_resource.cc
+++ b/ppapi/proxy/url_loader_resource.cc
@@ -4,6 +4,8 @@
#include "ppapi/proxy/url_loader_resource.h"
+#include <algorithm>
+
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "ppapi/c/pp_completion_callback.h"
@@ -23,11 +25,6 @@ using ppapi::thunk::EnterResourceNoLock;
using ppapi::thunk::PPB_URLLoader_API;
using ppapi::thunk::PPB_URLRequestInfo_API;
-#ifdef _MSC_VER
-// Do not warn about use of std::copy with raw pointers.
-#pragma warning(disable : 4996)
-#endif
-
namespace ppapi {
namespace proxy {
@@ -322,13 +319,15 @@ void URLLoaderResource::OnPluginMsgUpdateProgress(
bytes_received_ = bytes_received;
total_bytes_to_be_received_ = total_bytes_to_be_received;
- if (status_callback_)
+ if (status_callback_) {
status_callback_(pp_instance(), pp_resource(),
bytes_sent_, total_bytes_to_be_sent_,
bytes_received_, total_bytes_to_be_received_);
+ }
}
void URLLoaderResource::SetDefersLoading(bool defers_loading) {
+ is_asynchronous_load_suspended_ = defers_loading;
Post(RENDERER, PpapiHostMsg_URLLoader_SetDeferLoading(defers_loading));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698