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

Side by Side Diff: content/child/weburlresponse_extradata_impl.h

Issue 2429063002: Implement nextHopProtocol in PerformanceResourceTiming and PerformanceNavigationTiming.
Patch Set: Added core_export for PerformanceResourceTiming 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 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 "net/http/http_response_info.h" 13 #include "net/http/http_response_info.h"
14 #include "net/nqe/effective_connection_type.h" 14 #include "net/nqe/effective_connection_type.h"
15 #include "third_party/WebKit/public/platform/WebURLResponse.h" 15 #include "third_party/WebKit/public/platform/WebURLResponse.h"
16 16
17 namespace content { 17 namespace content {
18 18
19 class CONTENT_EXPORT WebURLResponseExtraDataImpl : 19 class CONTENT_EXPORT WebURLResponseExtraDataImpl :
20 public NON_EXPORTED_BASE(blink::WebURLResponse::ExtraData) { 20 public NON_EXPORTED_BASE(blink::WebURLResponse::ExtraData) {
21 public: 21 public:
22 explicit WebURLResponseExtraDataImpl( 22 WebURLResponseExtraDataImpl();
23 const std::string& alpn_negotiated_protocol);
24 ~WebURLResponseExtraDataImpl() override; 23 ~WebURLResponseExtraDataImpl() override;
25 24
26 const std::string& alpn_negotiated_protocol() const {
27 return alpn_negotiated_protocol_;
28 }
29
30 /// Flag whether this request was loaded via the SPDY protocol or not. 25 /// Flag whether this request was loaded via the SPDY protocol or not.
31 // SPDY is an experimental web protocol, see http://dev.chromium.org/spdy 26 // SPDY is an experimental web protocol, see http://dev.chromium.org/spdy
32 bool was_fetched_via_spdy() const { 27 bool was_fetched_via_spdy() const {
33 return was_fetched_via_spdy_; 28 return was_fetched_via_spdy_;
34 } 29 }
35 void set_was_fetched_via_spdy(bool was_fetched_via_spdy) { 30 void set_was_fetched_via_spdy(bool was_fetched_via_spdy) {
36 was_fetched_via_spdy_ = was_fetched_via_spdy; 31 was_fetched_via_spdy_ = was_fetched_via_spdy;
37 } 32 }
38 33
39 // Information about the type of connection used to fetch this response.
40 net::HttpResponseInfo::ConnectionInfo connection_info() const {
41 return connection_info_;
42 }
43 void set_connection_info(
44 net::HttpResponseInfo::ConnectionInfo connection_info) {
45 connection_info_ = connection_info;
46 }
47
48 // Flag whether this request was loaded after the 34 // Flag whether this request was loaded after the
49 // TLS/Next-Protocol-Negotiation was used. 35 // TLS/Next-Protocol-Negotiation was used.
50 // This is related to SPDY. 36 // This is related to SPDY.
51 bool was_alpn_negotiated() const { return was_alpn_negotiated_; } 37 bool was_alpn_negotiated() const { return was_alpn_negotiated_; }
52 void set_was_alpn_negotiated(bool was_alpn_negotiated) { 38 void set_was_alpn_negotiated(bool was_alpn_negotiated) {
53 was_alpn_negotiated_ = was_alpn_negotiated; 39 was_alpn_negotiated_ = was_alpn_negotiated;
54 } 40 }
55 41
56 // Flag whether this request was made when "Alternate-Protocol: xxx" 42 // Flag whether this request was made when "Alternate-Protocol: xxx"
57 // is present in server's response. 43 // is present in server's response.
(...skipping 15 matching lines...) Expand all
73 59
74 net::EffectiveConnectionType effective_connection_type() const { 60 net::EffectiveConnectionType effective_connection_type() const {
75 return effective_connection_type_; 61 return effective_connection_type_;
76 } 62 }
77 void set_effective_connection_type( 63 void set_effective_connection_type(
78 net::EffectiveConnectionType effective_connection_type) { 64 net::EffectiveConnectionType effective_connection_type) {
79 effective_connection_type_ = effective_connection_type; 65 effective_connection_type_ = effective_connection_type;
80 } 66 }
81 67
82 private: 68 private:
83 std::string alpn_negotiated_protocol_;
84 bool is_ftp_directory_listing_; 69 bool is_ftp_directory_listing_;
85 bool was_fetched_via_spdy_; 70 bool was_fetched_via_spdy_;
86 bool was_alpn_negotiated_; 71 bool was_alpn_negotiated_;
87 net::HttpResponseInfo::ConnectionInfo connection_info_;
88 bool was_alternate_protocol_available_; 72 bool was_alternate_protocol_available_;
89 bool is_using_lofi_; 73 bool is_using_lofi_;
90 net::EffectiveConnectionType effective_connection_type_; 74 net::EffectiveConnectionType effective_connection_type_;
91 75
92 DISALLOW_COPY_AND_ASSIGN(WebURLResponseExtraDataImpl); 76 DISALLOW_COPY_AND_ASSIGN(WebURLResponseExtraDataImpl);
93 }; 77 };
94 78
95 } // namespace content 79 } // namespace content
96 80
97 #endif // CONTENT_CHILD_WEBURLRESPONSE_EXTRADATA_IMPL_H_ 81 #endif // CONTENT_CHILD_WEBURLRESPONSE_EXTRADATA_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698