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

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

Issue 2484633004: Change Lo-Fi bool to bitmask to support multiple Previews types (Closed)
Patch Set: fix ContentResourceProviderTest Created 3 years, 11 months 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
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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 // Returns a bitmask of potentially several Previews optimizations.
72 void set_is_using_lofi(bool is_using_lofi) { is_using_lofi_ = is_using_lofi; } 73 PreviewsState previews_state() const { return previews_state_; }
74 void set_previews_state(PreviewsState previews_state) {
75 previews_state_ = previews_state;
76 }
73 77
74 net::EffectiveConnectionType effective_connection_type() const { 78 net::EffectiveConnectionType effective_connection_type() const {
75 return effective_connection_type_; 79 return effective_connection_type_;
76 } 80 }
77 void set_effective_connection_type( 81 void set_effective_connection_type(
78 net::EffectiveConnectionType effective_connection_type) { 82 net::EffectiveConnectionType effective_connection_type) {
79 effective_connection_type_ = effective_connection_type; 83 effective_connection_type_ = effective_connection_type;
80 } 84 }
81 85
82 private: 86 private:
83 std::string alpn_negotiated_protocol_; 87 std::string alpn_negotiated_protocol_;
84 bool is_ftp_directory_listing_; 88 bool is_ftp_directory_listing_;
85 bool was_fetched_via_spdy_; 89 bool was_fetched_via_spdy_;
86 bool was_alpn_negotiated_; 90 bool was_alpn_negotiated_;
87 net::HttpResponseInfo::ConnectionInfo connection_info_; 91 net::HttpResponseInfo::ConnectionInfo connection_info_;
88 bool was_alternate_protocol_available_; 92 bool was_alternate_protocol_available_;
89 bool is_using_lofi_; 93 PreviewsState previews_state_;
90 net::EffectiveConnectionType effective_connection_type_; 94 net::EffectiveConnectionType effective_connection_type_;
91 95
92 DISALLOW_COPY_AND_ASSIGN(WebURLResponseExtraDataImpl); 96 DISALLOW_COPY_AND_ASSIGN(WebURLResponseExtraDataImpl);
93 }; 97 };
94 98
95 } // namespace content 99 } // namespace content
96 100
97 #endif // CONTENT_CHILD_WEBURLRESPONSE_EXTRADATA_IMPL_H_ 101 #endif // CONTENT_CHILD_WEBURLRESPONSE_EXTRADATA_IMPL_H_
OLDNEW
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698