| Index: src/trusted/plugin/srpc/closure.h | 
| =================================================================== | 
| --- src/trusted/plugin/srpc/closure.h	(revision 1695) | 
| +++ src/trusted/plugin/srpc/closure.h	(working copy) | 
| @@ -8,6 +8,7 @@ | 
| #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_CLOSURE_H_ | 
| #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SRPC_CLOSURE_H_ | 
|  | 
| +#include <list> | 
| #include <string> | 
|  | 
| #include "native_client/src/shared/npruntime/npmodule.h" | 
| @@ -37,6 +38,7 @@ | 
| } | 
| } | 
| virtual ~Closure() {} | 
| +  /* TODO(adonovan): documentation, especially nullness invariants. */ | 
| virtual void Run(NPStream *stream, const char *fname) = 0; | 
| virtual void Run(const char *url, const void* buffer, int32_t size) = 0; | 
| bool StartDownload(); | 
| @@ -49,6 +51,7 @@ | 
| nacl::StreamBuffer* buffer() { return buffer_; } | 
| protected: | 
| Plugin* plugin() { return plugin_; } | 
| +  const std::string& url() const { return url_; } | 
| private: | 
| Plugin* plugin_; | 
| std::string url_; | 
| @@ -58,10 +61,16 @@ | 
|  | 
| class LoadNaClAppNotify : public Closure { | 
| public: | 
| -  LoadNaClAppNotify(Plugin *plugin, std::string url); | 
| +  // Precondition: urls.list() > 0. | 
| +  LoadNaClAppNotify(Plugin *plugin, const std::list<std::string>& urls); | 
| virtual ~LoadNaClAppNotify(); | 
| +  // Run(NULL, NULL) is called if the request failed; a new request | 
| +  // for the fallback_urls should be initiated. | 
| virtual void Run(NPStream* stream, const char* fname); | 
| virtual void Run(const char *url, const void* buffer, int32_t size); | 
| + private: | 
| +  // The list of alternative URLs to try should this request fail. | 
| +  std::list<std::string> fallback_urls_; | 
| }; | 
|  | 
| class UrlAsNaClDescNotify : public Closure { | 
|  |