OLD | NEW |
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 #include "content/public/renderer/document_state.h" | 5 #include "content/public/renderer/document_state.h" |
6 | 6 |
7 #include "content/public/common/password_form.h" | 7 #include "content/public/common/password_form.h" |
8 #include "content/public/renderer/navigation_state.h" | 8 #include "content/public/renderer/navigation_state.h" |
9 #include "webkit/glue/alt_error_page_resource_fetcher.h" | |
10 | 9 |
11 namespace content { | 10 namespace content { |
12 | 11 |
13 DocumentState::DocumentState() | 12 DocumentState::DocumentState() |
14 : load_histograms_recorded_(false), | 13 : load_histograms_recorded_(false), |
15 web_timing_histograms_recorded_(false), | 14 web_timing_histograms_recorded_(false), |
16 http_status_code_(0), | |
17 was_fetched_via_spdy_(false), | 15 was_fetched_via_spdy_(false), |
18 was_npn_negotiated_(false), | 16 was_npn_negotiated_(false), |
19 was_alternate_protocol_available_(false), | 17 was_alternate_protocol_available_(false), |
20 was_fetched_via_proxy_(false), | 18 was_fetched_via_proxy_(false), |
21 use_error_page_(false), | |
22 is_overriding_user_agent_(false), | |
23 must_reset_scroll_and_scale_state_(false), | |
24 was_prefetcher_(false), | 19 was_prefetcher_(false), |
25 was_referred_by_prefetcher_(false), | 20 was_referred_by_prefetcher_(false), |
26 load_type_(UNDEFINED_LOAD), | 21 load_type_(UNDEFINED_LOAD), |
27 cache_policy_override_set_(false), | |
28 cache_policy_override_(WebKit::WebURLRequest::UseProtocolCachePolicy), | |
29 referrer_policy_set_(false), | |
30 referrer_policy_(WebKit::WebReferrerPolicyDefault), | |
31 can_load_local_resources_(false) { | 22 can_load_local_resources_(false) { |
32 } | 23 } |
33 | 24 |
34 DocumentState::~DocumentState() {} | 25 DocumentState::~DocumentState() {} |
35 | 26 |
36 void DocumentState::set_password_form_data( | 27 void DocumentState::set_password_form_data( |
37 scoped_ptr<PasswordForm> data) { | 28 scoped_ptr<PasswordForm> data) { |
38 password_form_data_.reset(data.release()); | 29 password_form_data_.reset(data.release()); |
39 } | 30 } |
40 | 31 |
41 void DocumentState::set_alt_error_page_fetcher( | |
42 webkit_glue::AltErrorPageResourceFetcher* f) { | |
43 alt_error_page_fetcher_.reset(f); | |
44 } | |
45 | |
46 void DocumentState::set_navigation_state(NavigationState* navigation_state) { | 32 void DocumentState::set_navigation_state(NavigationState* navigation_state) { |
47 navigation_state_.reset(navigation_state); | 33 navigation_state_.reset(navigation_state); |
48 } | 34 } |
49 | 35 |
50 } // namespace content | 36 } // namespace content |
OLD | NEW |