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

Side by Side Diff: content/public/renderer/document_state.h

Issue 1304373007: Browser test for LoadDataWithBaseURL reload (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years 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_PUBLIC_RENDERER_DOCUMENT_STATE_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_
6 #define CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_ 6 #define CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/supports_user_data.h" 12 #include "base/supports_user_data.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "net/http/http_response_info.h" 15 #include "net/http/http_response_info.h"
16 #include "third_party/WebKit/public/web/WebDataSource.h" 16 #include "third_party/WebKit/public/web/WebDataSource.h"
17 #include "url/gurl.h"
17 18
18 namespace content { 19 namespace content {
19 20
20 class NavigationState; 21 class NavigationState;
21 22
22 // The RenderView stores an instance of this class in the "extra data" of each 23 // The RenderView stores an instance of this class in the "extra data" of each
23 // WebDataSource (see RenderView::DidCreateDataSource). 24 // WebDataSource (see RenderView::DidCreateDataSource).
24 class CONTENT_EXPORT DocumentState 25 class CONTENT_EXPORT DocumentState
25 : NON_EXPORTED_BASE(public blink::WebDataSource::ExtraData), 26 : NON_EXPORTED_BASE(public blink::WebDataSource::ExtraData),
26 public base::SupportsUserData { 27 public base::SupportsUserData {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 175 }
175 bool was_referred_by_prefetcher() const { 176 bool was_referred_by_prefetcher() const {
176 return was_referred_by_prefetcher_; 177 return was_referred_by_prefetcher_;
177 } 178 }
178 179
179 void set_was_after_preconnect_request(bool value) { 180 void set_was_after_preconnect_request(bool value) {
180 was_after_preconnect_request_ = value; 181 was_after_preconnect_request_ = value;
181 } 182 }
182 bool was_after_preconnect_request() { return was_after_preconnect_request_; } 183 bool was_after_preconnect_request() { return was_after_preconnect_request_; }
183 184
185 // For LoadDataWithBaseURL navigations, |was_load_data_with_base_url_request_|
186 // is set to true and |data_url_| is set to the data URL of the navigation.
187 // Otherwise, |was_load_data_with_base_url_request_| is false and |data_url_|
188 // is empty.
189 void set_was_load_data_with_base_url_request(bool value) {
190 was_load_data_with_base_url_request_ = value;
191 }
192 bool was_load_data_with_base_url_request() const {
193 return was_load_data_with_base_url_request_;
194 }
195 const GURL& data_url() const {
196 return data_url_;
197 }
198 void set_data_url(const GURL& data_url) {
199 data_url_ = data_url;
200 }
201
184 // Record the nature of this load, for use when histogramming page load times. 202 // Record the nature of this load, for use when histogramming page load times.
185 LoadType load_type() const { return load_type_; } 203 LoadType load_type() const { return load_type_; }
186 void set_load_type(LoadType load_type) { load_type_ = load_type; } 204 void set_load_type(LoadType load_type) { load_type_ = load_type; }
187 205
188 NavigationState* navigation_state() { return navigation_state_.get(); } 206 NavigationState* navigation_state() { return navigation_state_.get(); }
189 void set_navigation_state(NavigationState* navigation_state); 207 void set_navigation_state(NavigationState* navigation_state);
190 208
191 bool can_load_local_resources() const { return can_load_local_resources_; } 209 bool can_load_local_resources() const { return can_load_local_resources_; }
192 void set_can_load_local_resources(bool can_load) { 210 void set_can_load_local_resources(bool can_load) {
193 can_load_local_resources_ = can_load; 211 can_load_local_resources_ = can_load;
(...skipping 15 matching lines...) Expand all
209 bool was_alternate_protocol_available_; 227 bool was_alternate_protocol_available_;
210 net::HttpResponseInfo::ConnectionInfo connection_info_; 228 net::HttpResponseInfo::ConnectionInfo connection_info_;
211 bool was_fetched_via_proxy_; 229 bool was_fetched_via_proxy_;
212 net::HostPortPair proxy_server_; 230 net::HostPortPair proxy_server_;
213 231
214 // A prefetcher is a page that contains link rel=prefetch elements. 232 // A prefetcher is a page that contains link rel=prefetch elements.
215 bool was_prefetcher_; 233 bool was_prefetcher_;
216 bool was_referred_by_prefetcher_; 234 bool was_referred_by_prefetcher_;
217 bool was_after_preconnect_request_; 235 bool was_after_preconnect_request_;
218 236
237 bool was_load_data_with_base_url_request_;
238 GURL data_url_;
239
219 LoadType load_type_; 240 LoadType load_type_;
220 241
221 scoped_ptr<NavigationState> navigation_state_; 242 scoped_ptr<NavigationState> navigation_state_;
222 243
223 bool can_load_local_resources_; 244 bool can_load_local_resources_;
224 }; 245 };
225 246
226 #endif // CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_ 247 #endif // CONTENT_PUBLIC_RENDERER_DOCUMENT_STATE_H_
227 248
228 } // namespace content 249 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_browsertest.cc ('k') | content/public/renderer/document_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698