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

Unified Diff: chrome/browser/renderer_host/resource_dispatcher_host.h

Issue 67019: URLRequest::Interceptor enhancements... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 | chrome/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/resource_dispatcher_host.h
===================================================================
--- chrome/browser/renderer_host/resource_dispatcher_host.h (revision 13871)
+++ chrome/browser/renderer_host/resource_dispatcher_host.h (working copy)
@@ -309,20 +309,21 @@
virtual void OnReadCompleted(URLRequest* request, int bytes_read);
void OnResponseCompleted(URLRequest* request);
- // Helper function to get our extra data out of a request. The given request
+ // Helper functions to get our extra data out of a request. The given request
// must have been one we created so that it has the proper extra data pointer.
static ExtraRequestInfo* ExtraInfoForRequest(URLRequest* request) {
- ExtraRequestInfo* r = static_cast<ExtraRequestInfo*>(request->user_data());
- DLOG_IF(WARNING, !r) << "Request doesn't seem to have our data";
- return r;
+ ExtraRequestInfo* info
+ = static_cast<ExtraRequestInfo*>(request->GetUserData(NULL));
+ DLOG_IF(WARNING, !info) << "Request doesn't seem to have our data";
+ return info;
}
static const ExtraRequestInfo* ExtraInfoForRequest(
const URLRequest* request) {
- const ExtraRequestInfo* r =
- static_cast<const ExtraRequestInfo*>(request->user_data());
- DLOG_IF(WARNING, !r) << "Request doesn't seem to have our data";
- return r;
+ const ExtraRequestInfo* info =
+ static_cast<const ExtraRequestInfo*>(request->GetUserData(NULL));
+ DLOG_IF(WARNING, !info) << "Request doesn't seem to have our data";
+ return info;
}
// Adds an observer. The observer will be called on the IO thread. To
@@ -380,6 +381,10 @@
friend class ShutdownTask;
+ void SetExtraInfoForRequest(URLRequest* request, ExtraRequestInfo* info) {
+ request->SetUserData(NULL, info);
+ }
+
// A shutdown helper that runs on the IO thread.
void OnShutdown();
« no previous file with comments | « no previous file | chrome/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698