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

Unified Diff: components/nacl/renderer/manifest_downloader.h

Issue 276423003: Pepper: Nexe downloading out of the trusted plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 7 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 | « components/nacl/renderer/file_downloader.cc ('k') | components/nacl/renderer/manifest_downloader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/manifest_downloader.h
diff --git a/components/nacl/renderer/manifest_downloader.h b/components/nacl/renderer/manifest_downloader.h
index 7488cab0c2dfb0e40df5092deb4bafd586784ae0..20123fff3c773d2090f9df3fc97b89b254780dba 100644
--- a/components/nacl/renderer/manifest_downloader.h
+++ b/components/nacl/renderer/manifest_downloader.h
@@ -5,6 +5,7 @@
#include <string>
#include "base/callback.h"
+#include "base/memory/scoped_ptr.h"
#include "ppapi/c/private/ppb_nacl_private.h"
#include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
@@ -20,11 +21,7 @@ namespace nacl {
// caller through a callback.
class ManifestDownloader : public blink::WebURLLoaderClient {
public:
- typedef base::Callback<void(PP_NaClError, const std::string&)>
- ManifestDownloaderCallback;
-
- ManifestDownloader(bool is_installed, ManifestDownloaderCallback cb);
- virtual ~ManifestDownloader();
+ typedef base::Callback<void(PP_NaClError, const std::string&)> Callback;
// This is a pretty arbitrary limit on the byte size of the NaCl manifest
// file.
@@ -32,6 +29,13 @@ class ManifestDownloader : public blink::WebURLLoaderClient {
// for the null termination character.
static const size_t kNaClManifestMaxFileBytes = 1024 * 1024;
+ ManifestDownloader(scoped_ptr<blink::WebURLLoader> url_loader,
+ bool is_installed,
+ Callback cb);
+ virtual ~ManifestDownloader();
+
+ void Load(const blink::WebURLRequest& request);
+
private:
// WebURLLoaderClient implementation.
virtual void didReceiveResponse(blink::WebURLLoader* loader,
@@ -46,8 +50,9 @@ class ManifestDownloader : public blink::WebURLLoaderClient {
virtual void didFail(blink::WebURLLoader* loader,
const blink::WebURLError& error);
+ scoped_ptr<blink::WebURLLoader> url_loader_;
bool is_installed_;
- ManifestDownloaderCallback cb_;
+ Callback cb_;
std::string buffer_;
int status_code_;
PP_NaClError pp_nacl_error_;
« no previous file with comments | « components/nacl/renderer/file_downloader.cc ('k') | components/nacl/renderer/manifest_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698