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

Side by Side Diff: content/browser/loader/resource_request_info_impl.h

Issue 12886022: Implement offline mode behind a flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Setup OfflinePolicy for all started requests. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_
6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ 6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/supports_user_data.h" 13 #include "base/supports_user_data.h"
14 #include "content/public/browser/resource_request_info.h" 14 #include "content/public/browser/resource_request_info.h"
15 #include "content/public/common/referrer.h" 15 #include "content/public/common/referrer.h"
16 #include "net/base/load_states.h" 16 #include "net/base/load_states.h"
17 #include "webkit/glue/resource_type.h" 17 #include "webkit/glue/resource_type.h"
18 18
19 namespace webkit_blob { 19 namespace webkit_blob {
20 class BlobData; 20 class BlobData;
21 } 21 }
22 22
23 namespace content { 23 namespace content {
24 class CrossSiteResourceHandler; 24 class CrossSiteResourceHandler;
25 class ResourceContext; 25 class ResourceContext;
26 struct GlobalRequestID; 26 struct GlobalRequestID;
27 struct GlobalRoutingID;
27 28
28 // Holds the data ResourceDispatcherHost associates with each request. 29 // Holds the data ResourceDispatcherHost associates with each request.
29 // Retrieve this data by calling ResourceDispatcherHost::InfoForRequest. 30 // Retrieve this data by calling ResourceDispatcherHost::InfoForRequest.
30 class ResourceRequestInfoImpl : public ResourceRequestInfo, 31 class ResourceRequestInfoImpl : public ResourceRequestInfo,
31 public base::SupportsUserData::Data { 32 public base::SupportsUserData::Data {
32 public: 33 public:
33 // Returns the ResourceRequestInfoImpl associated with the given URLRequest. 34 // Returns the ResourceRequestInfoImpl associated with the given URLRequest.
34 CONTENT_EXPORT static ResourceRequestInfoImpl* ForRequest( 35 CONTENT_EXPORT static ResourceRequestInfoImpl* ForRequest(
35 net::URLRequest* request); 36 net::URLRequest* request);
36 37
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 virtual bool HasUserGesture() const OVERRIDE; 76 virtual bool HasUserGesture() const OVERRIDE;
76 virtual bool WasIgnoredByHandler() const OVERRIDE; 77 virtual bool WasIgnoredByHandler() const OVERRIDE;
77 virtual bool GetAssociatedRenderView(int* render_process_id, 78 virtual bool GetAssociatedRenderView(int* render_process_id,
78 int* render_view_id) const OVERRIDE; 79 int* render_view_id) const OVERRIDE;
79 virtual bool IsAsync() const OVERRIDE; 80 virtual bool IsAsync() const OVERRIDE;
80 81
81 82
82 CONTENT_EXPORT void AssociateWithRequest(net::URLRequest* request); 83 CONTENT_EXPORT void AssociateWithRequest(net::URLRequest* request);
83 84
84 CONTENT_EXPORT GlobalRequestID GetGlobalRequestID() const; 85 CONTENT_EXPORT GlobalRequestID GetGlobalRequestID() const;
86 GlobalRoutingID GetGlobalRoutingID() const;
85 87
86 // CrossSiteResourceHandler for this request. May be null. 88 // CrossSiteResourceHandler for this request. May be null.
87 CrossSiteResourceHandler* cross_site_handler() { 89 CrossSiteResourceHandler* cross_site_handler() {
88 return cross_site_handler_; 90 return cross_site_handler_;
89 } 91 }
90 void set_cross_site_handler(CrossSiteResourceHandler* h) { 92 void set_cross_site_handler(CrossSiteResourceHandler* h) {
91 cross_site_handler_ = h; 93 cross_site_handler_ = h;
92 } 94 }
93 95
94 // Identifies the type of process (renderer, plugin, etc.) making the request. 96 // Identifies the type of process (renderer, plugin, etc.) making the request.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 WebKit::WebReferrerPolicy referrer_policy_; 148 WebKit::WebReferrerPolicy referrer_policy_;
147 ResourceContext* context_; 149 ResourceContext* context_;
148 bool is_async_; 150 bool is_async_;
149 151
150 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); 152 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl);
151 }; 153 };
152 154
153 } // namespace content 155 } // namespace content
154 156
155 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ 157 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/loader/resource_request_info_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698