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

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

Issue 2512563003: Convert enable_plugins to a buildflag header. (Closed)
Patch Set: Merge Created 4 years, 1 month 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
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_MIME_SNIFFING_RESOURCE_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_LOADER_MIME_SNIFFING_RESOURCE_HANDLER_H_
6 #define CONTENT_BROWSER_LOADER_MIME_SNIFFING_RESOURCE_HANDLER_H_ 6 #define CONTENT_BROWSER_LOADER_MIME_SNIFFING_RESOURCE_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "content/browser/loader/layered_resource_handler.h" 13 #include "content/browser/loader/layered_resource_handler.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "content/public/browser/resource_controller.h" 15 #include "content/public/browser/resource_controller.h"
16 #include "content/public/common/request_context_type.h" 16 #include "content/public/common/request_context_type.h"
17 #include "ppapi/features/features.h"
17 18
18 namespace net { 19 namespace net {
19 class URLRequest; 20 class URLRequest;
20 } 21 }
21 22
22 namespace content { 23 namespace content {
23 class InterceptingResourceHandler; 24 class InterceptingResourceHandler;
24 class PluginService; 25 class PluginService;
25 class ResourceDispatcherHostImpl; 26 class ResourceDispatcherHostImpl;
26 struct WebPluginInfo; 27 struct WebPluginInfo;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 bool CheckResponseIsNotProvisional(); 144 bool CheckResponseIsNotProvisional();
144 145
145 bool MustDownload(); 146 bool MustDownload();
146 147
147 // Called on the IO thread once the list of plugins has been loaded. 148 // Called on the IO thread once the list of plugins has been loaded.
148 void OnPluginsLoaded(const std::vector<WebPluginInfo>& plugins); 149 void OnPluginsLoaded(const std::vector<WebPluginInfo>& plugins);
149 150
150 State state_; 151 State state_;
151 152
152 ResourceDispatcherHostImpl* host_; 153 ResourceDispatcherHostImpl* host_;
153 #if defined(ENABLE_PLUGINS) 154 #if BUILDFLAG(ENABLE_PLUGINS)
154 PluginService* plugin_service_; 155 PluginService* plugin_service_;
155 #endif 156 #endif
156 157
157 bool must_download_; 158 bool must_download_;
158 bool must_download_is_set_; 159 bool must_download_is_set_;
159 160
160 // Used to buffer the reponse received until replay. 161 // Used to buffer the reponse received until replay.
161 scoped_refptr<ResourceResponse> response_; 162 scoped_refptr<ResourceResponse> response_;
162 scoped_refptr<net::IOBuffer> read_buffer_; 163 scoped_refptr<net::IOBuffer> read_buffer_;
163 int read_buffer_size_; 164 int read_buffer_size_;
164 int bytes_read_; 165 int bytes_read_;
165 166
166 // The InterceptingResourceHandler that will perform ResourceHandler swap if 167 // The InterceptingResourceHandler that will perform ResourceHandler swap if
167 // needed. 168 // needed.
168 InterceptingResourceHandler* intercepting_handler_; 169 InterceptingResourceHandler* intercepting_handler_;
169 170
170 RequestContextType request_context_type_; 171 RequestContextType request_context_type_;
171 172
172 base::WeakPtrFactory<MimeSniffingResourceHandler> weak_ptr_factory_; 173 base::WeakPtrFactory<MimeSniffingResourceHandler> weak_ptr_factory_;
173 174
174 DISALLOW_COPY_AND_ASSIGN(MimeSniffingResourceHandler); 175 DISALLOW_COPY_AND_ASSIGN(MimeSniffingResourceHandler);
175 }; 176 };
176 177
177 } // namespace content 178 } // namespace content
178 179
179 #endif // CONTENT_BROWSER_LOADER_MIME_SNIFFING_RESOURCE_HANDLER_H_ 180 #endif // CONTENT_BROWSER_LOADER_MIME_SNIFFING_RESOURCE_HANDLER_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_message_filter.cc ('k') | content/browser/loader/mime_sniffing_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698