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

Unified Diff: net/url_request/url_request.h

Issue 6382003: Reorder the methods in net/url_request/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compiling net_unittests != compiling the rest of chrome Created 9 years, 11 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 | « net/url_request/https_prober.cc ('k') | net/url_request/url_request_data_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 3561a294624dccccc8eeb5d653a794eb13b10034..f257ed6d6222156edcdd032ba08eb117cf2f3702 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -58,6 +58,21 @@ class X509Certificate;
//
class URLRequest : public base::NonThreadSafe {
public:
+ // Callback function implemented by protocol handlers to create new jobs.
+ // The factory may return NULL to indicate an error, which will cause other
+ // factories to be queried. If no factory handles the request, then the
+ // default job will be used.
+ typedef URLRequestJob* (ProtocolFactory)(URLRequest* request,
+ const std::string& scheme);
+
+ // HTTP request/response header IDs (via some preprocessor fun) for use with
+ // SetRequestHeaderById and GetResponseHeaderById.
+ enum {
+#define HTTP_ATOM(x) HTTP_ ## x,
+#include "net/http/http_atom_list.h"
+#undef HTTP_ATOM
+ };
+
// Derive from this class and add your own data members to associate extra
// information with a URLRequest. Use GetUserData(key) and SetUserData()
class UserData {
@@ -66,13 +81,6 @@ class URLRequest : public base::NonThreadSafe {
virtual ~UserData() {}
};
- // Callback function implemented by protocol handlers to create new jobs.
- // The factory may return NULL to indicate an error, which will cause other
- // factories to be queried. If no factory handles the request, then the
- // default job will be used.
- typedef URLRequestJob* (ProtocolFactory)(URLRequest* request,
- const std::string& scheme);
-
// This class handles network interception. Use with
// (Un)RegisterRequestInterceptor.
class Interceptor {
@@ -509,14 +517,6 @@ class URLRequest : public base::NonThreadSafe {
// cancel the request instead, call Cancel().
void ContinueDespiteLastError();
- // HTTP request/response header IDs (via some preprocessor fun) for use with
- // SetRequestHeaderById and GetResponseHeaderById.
- enum {
-#define HTTP_ATOM(x) HTTP_ ## x,
-#include "net/http/http_atom_list.h"
-#undef HTTP_ATOM
- };
-
// Returns true if performance profiling should be enabled on the
// URLRequestJob serving this request.
bool enable_profiling() const { return enable_profiling_; }
@@ -568,6 +568,7 @@ class URLRequest : public base::NonThreadSafe {
private:
friend class URLRequestJob;
+ typedef std::map<const void*, linked_ptr<UserData> > UserDataMap;
void StartJob(URLRequestJob* job);
@@ -620,7 +621,6 @@ class URLRequest : public base::NonThreadSafe {
bool is_pending_;
// Externally-defined data accessible by key
- typedef std::map<const void*, linked_ptr<UserData> > UserDataMap;
UserDataMap user_data_;
// Whether to enable performance profiling on the job serving this request.
« no previous file with comments | « net/url_request/https_prober.cc ('k') | net/url_request/url_request_data_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698