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

Unified Diff: ppapi/native_client/src/trusted/plugin/file_downloader.h

Issue 181933005: Pepper: Simplify FileDownloader::url(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « no previous file | ppapi/native_client/src/trusted/plugin/file_downloader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/native_client/src/trusted/plugin/file_downloader.h
diff --git a/ppapi/native_client/src/trusted/plugin/file_downloader.h b/ppapi/native_client/src/trusted/plugin/file_downloader.h
index 2dee5879513820b21c74d67257620171cef96bd4..c291daa78d238ed67f80130f425e485ba5c0b709 100644
--- a/ppapi/native_client/src/trusted/plugin/file_downloader.h
+++ b/ppapi/native_client/src/trusted/plugin/file_downloader.h
@@ -142,15 +142,14 @@ class FileDownloader {
// Returns the time delta between the call to Open() and this function.
int64_t TimeSinceOpenMilliseconds() const;
- // The value of |url_| changes over the life of this instance. When the file
- // is first opened, |url_| is a copy of the URL used to open the file, which
- // can be a relative URL. Once the GET request has finished, and the contents
- // of the file represented by |url_| are available, |url_| is the full URL
- // including the scheme, host and full path.
+ // Returns the url passed to Open().
const nacl::string& url() const { return url_; }
- // Returns the url passed to Open().
- const nacl::string& url_to_open() const { return url_to_open_; }
+ // Once the GET request has finished, and the contents of the file
+ // represented by |url_| are available, |full_url_| is the full URL including
+ // the scheme, host and full path.
+ // Returns an empty string before the GET request has finished.
+ const nacl::string& full_url() const { return full_url_; }
// Returns the PP_Resource of the active URL loader, or kInvalidResource.
PP_Resource url_loader() const { return url_loader_.pp_resource(); }
@@ -208,8 +207,9 @@ class FileDownloader {
void GotFileHandleNotify(int32_t pp_error, PP_FileHandle handle);
Plugin* instance_;
- nacl::string url_to_open_;
nacl::string url_;
+ nacl::string full_url_;
+
nacl::string extra_request_headers_;
pp::URLResponseInfo url_response_;
pp::CompletionCallback file_open_notify_callback_;
« no previous file with comments | « no previous file | ppapi/native_client/src/trusted/plugin/file_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698