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

Unified Diff: ppapi/cpp/url_loader.h

Issue 7715005: Changed all @code to <code> and @endcode to </code> as per dmichael (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | « ppapi/cpp/paint_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/url_loader.h
===================================================================
--- ppapi/cpp/url_loader.h (revision 98665)
+++ ppapi/cpp/url_loader.h (working copy)
@@ -18,67 +18,8 @@
class URLResponseInfo;
/// URLLoader provides an API for loading URLs.
-///
-/// <strong>Example:</strong>
-///
-/// @code
-///
-/// class MyHandler {
-/// public:
-/// MyHandler(Instance* instance)
-/// : factory_(this),
-/// loader_(instance),
-/// did_open_(false) {
-/// }
-/// void ProcessURL(const char* url) {
-/// CompletionCallback* cc = NewCallback();
-/// int32_t rv = loader_.Open(MakeRequest(url), cc);
-/// if (rv != PP_Error_WouldBlock)
-/// cc->Run(rv);
-/// }
-/// private:
-/// CompletionCallback* NewCallback() {
-/// return factory_.NewOptionalCallback(&MyHandler::DidCompleteIO);
-/// }
-/// URLRequestInfo MakeRequest(const char* url) {
-/// URLRequestInfo request;
-/// request.SetURL(url);
-/// request.SetMethod("GET");
-/// request.SetFollowRedirects(true);
-/// return request;
-/// }
-/// void DidCompleteIO(int32_t result) {
-/// if (result > 0) {
-/// // buf_ now contains 'result' number of bytes from the URL.
-/// ProcessBytes(buf_, result);
-/// ReadMore();
-/// } else if (result == PP_OK && !did_open_) {
-/// // Headers are available, and we can start reading the body.
-/// did_open_ = true;
-/// ProcessResponseInfo(loader_.GetResponseInfo());
-/// ReadMore();
-/// } else {
-/// // Done reading (possibly with an error given by 'result').
-/// }
-/// }
-/// void ReadMore() {
-/// CompletionCallback* cc = NewCallback();
-/// int32_t rv = fio_.Read(offset_, buf_, sizeof(buf_), cc);
-/// if (rv != PP_Error_WouldBlock)
-/// cc->Run(rv);
-/// }
-/// void ProcessResponseInfo(const URLResponseInfo& response_info) {
-/// // Read response headers, etc.
-/// }
-/// void ProcessBytes(const char* bytes, int32_t length) {
-/// // Do work ...
-/// }
-/// pp::CompletionCallbackFactory<MyHandler> factory_;
-/// pp::URLLoader loader_;
-/// char buf_[4096];
-/// bool did_open_;
-/// };
-/// @endcode
+/// Refer to <code>ppapi/examples/url_loader/streaming.cc</code>
+/// for an example of how to use this class.
class URLLoader : public Resource {
public:
/// Default constructor for creating an is_null()
@@ -92,7 +33,8 @@
/// A constructor used when a <code>PP_Resource</code> is provided as a
/// return value whose reference count we need to increment.
///
- /// @param[in] resource A <code>PP_Resource</code>.
+ /// @param[in] resource A <code>PP_Resource</code> corresponding to a
+ /// <code>URLLoader</code> resource.
explicit URLLoader(PP_Resource resource);
/// A constructor used to allocate a new URLLoader in the browser. The
« no previous file with comments | « ppapi/cpp/paint_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698