OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHILD_WEBURLRESPONSE_EXTRADATA_IMPL_H_ | 5 #ifndef CONTENT_CHILD_WEBURLRESPONSE_EXTRADATA_IMPL_H_ |
6 #define CONTENT_CHILD_WEBURLRESPONSE_EXTRADATA_IMPL_H_ | 6 #define CONTENT_CHILD_WEBURLRESPONSE_EXTRADATA_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/public/common/previews_state.h" |
13 #include "net/http/http_response_info.h" | 14 #include "net/http/http_response_info.h" |
14 #include "net/nqe/effective_connection_type.h" | 15 #include "net/nqe/effective_connection_type.h" |
15 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 16 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
16 | 17 |
17 namespace content { | 18 namespace content { |
18 | 19 |
19 class CONTENT_EXPORT WebURLResponseExtraDataImpl : | 20 class CONTENT_EXPORT WebURLResponseExtraDataImpl : |
20 public NON_EXPORTED_BASE(blink::WebURLResponse::ExtraData) { | 21 public NON_EXPORTED_BASE(blink::WebURLResponse::ExtraData) { |
21 public: | 22 public: |
22 explicit WebURLResponseExtraDataImpl( | 23 explicit WebURLResponseExtraDataImpl( |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 void set_was_alternate_protocol_available( | 62 void set_was_alternate_protocol_available( |
62 bool was_alternate_protocol_available) { | 63 bool was_alternate_protocol_available) { |
63 was_alternate_protocol_available_ = was_alternate_protocol_available; | 64 was_alternate_protocol_available_ = was_alternate_protocol_available; |
64 } | 65 } |
65 | 66 |
66 bool is_ftp_directory_listing() const { return is_ftp_directory_listing_; } | 67 bool is_ftp_directory_listing() const { return is_ftp_directory_listing_; } |
67 void set_is_ftp_directory_listing(bool is_ftp_directory_listing) { | 68 void set_is_ftp_directory_listing(bool is_ftp_directory_listing) { |
68 is_ftp_directory_listing_ = is_ftp_directory_listing; | 69 is_ftp_directory_listing_ = is_ftp_directory_listing; |
69 } | 70 } |
70 | 71 |
71 bool is_using_lofi() const { return is_using_lofi_; } | 72 PreviewsState previews_state() const { return previews_state_; } |
72 void set_is_using_lofi(bool is_using_lofi) { is_using_lofi_ = is_using_lofi; } | 73 void set_previews_state(PreviewsState previews_state) { |
| 74 previews_state_ = previews_state; |
| 75 } |
73 | 76 |
74 net::EffectiveConnectionType effective_connection_type() const { | 77 net::EffectiveConnectionType effective_connection_type() const { |
75 return effective_connection_type_; | 78 return effective_connection_type_; |
76 } | 79 } |
77 void set_effective_connection_type( | 80 void set_effective_connection_type( |
78 net::EffectiveConnectionType effective_connection_type) { | 81 net::EffectiveConnectionType effective_connection_type) { |
79 effective_connection_type_ = effective_connection_type; | 82 effective_connection_type_ = effective_connection_type; |
80 } | 83 } |
81 | 84 |
82 private: | 85 private: |
83 std::string alpn_negotiated_protocol_; | 86 std::string alpn_negotiated_protocol_; |
84 bool is_ftp_directory_listing_; | 87 bool is_ftp_directory_listing_; |
85 bool was_fetched_via_spdy_; | 88 bool was_fetched_via_spdy_; |
86 bool was_alpn_negotiated_; | 89 bool was_alpn_negotiated_; |
87 net::HttpResponseInfo::ConnectionInfo connection_info_; | 90 net::HttpResponseInfo::ConnectionInfo connection_info_; |
88 bool was_alternate_protocol_available_; | 91 bool was_alternate_protocol_available_; |
89 bool is_using_lofi_; | 92 PreviewsState previews_state_; |
90 net::EffectiveConnectionType effective_connection_type_; | 93 net::EffectiveConnectionType effective_connection_type_; |
91 | 94 |
92 DISALLOW_COPY_AND_ASSIGN(WebURLResponseExtraDataImpl); | 95 DISALLOW_COPY_AND_ASSIGN(WebURLResponseExtraDataImpl); |
93 }; | 96 }; |
94 | 97 |
95 } // namespace content | 98 } // namespace content |
96 | 99 |
97 #endif // CONTENT_CHILD_WEBURLRESPONSE_EXTRADATA_IMPL_H_ | 100 #endif // CONTENT_CHILD_WEBURLRESPONSE_EXTRADATA_IMPL_H_ |
OLD | NEW |