Commit d6cbfe88 authored by teravest@chromium.org's avatar teravest@chromium.org

Pepper: Remove Plugin::StreamAsFile.

This method isn't necessary any longer. This is a small change to clean up more
of the OpenManifestEntry logic and move it out of the trusted plugin.

BUG=239656
R=dmichael@chromium.org

Review URL: https://codereview.chromium.org/296403010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273034 0039d316-1c4b-4281-b951-d872f2087c98
parent a017938b
......@@ -561,16 +561,6 @@ void Plugin::RequestNaClManifest(const nacl::string& url) {
open_callback.pp_completion_callback());
}
void Plugin::StreamAsFile(const nacl::string& url,
PP_NaClFileInfo* file_info,
const pp::CompletionCallback& callback) {
PLUGIN_PRINTF(("Plugin::StreamAsFile (url='%s')\n", url.c_str()));
nacl_interface_->DownloadFile(pp_instance(),
url.c_str(),
file_info,
callback.pp_completion_callback());
}
void Plugin::ReportLoadSuccess(uint64_t loaded_bytes, uint64_t total_bytes) {
nacl_interface_->ReportLoadSuccess(
pp_instance(), program_url_.c_str(), loaded_bytes, total_bytes);
......
......@@ -149,13 +149,6 @@ class Plugin : public pp::Instance {
// event.
void DispatchProgressEvent(int32_t result);
// Requests a URL asynchronously, resulting in a call to |callback| with
// an error code indicating status. On success, writes file information to
// |file_info|.
void StreamAsFile(const nacl::string& url,
PP_NaClFileInfo* file_info,
const pp::CompletionCallback& callback);
// A helper function that indicates if |url| can be requested by the document
// under the same-origin policy. Strictly speaking, it may be possible for the
// document to request the URL using CORS even if this function returns false.
......
......@@ -406,7 +406,10 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation(
&PluginReverseInterface::StreamAsFile_MainThreadContinuation,
open_cont);
plugin_->StreamAsFile(mapped_url, &open_cont->pp_file_info, stream_cc);
GetNaClInterface()->DownloadFile(plugin_->pp_instance(),
mapped_url.c_str(),
&open_cont->pp_file_info,
stream_cc.pp_completion_callback());
// p is deleted automatically.
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment