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

Side by Side Diff: components/cronet/android/url_request_adapter.cc

Issue 2347163002: s/NPN/ALPN/ (Closed)
Patch Set: Re: #12. Created 4 years, 3 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
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 #include "components/cronet/android/url_request_adapter.h" 5 #include "components/cronet/android/url_request_adapter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 net::HttpResponseHeaders* URLRequestAdapter::GetResponseHeaders() const { 103 net::HttpResponseHeaders* URLRequestAdapter::GetResponseHeaders() const {
104 if (url_request_ == NULL) { 104 if (url_request_ == NULL) {
105 return NULL; 105 return NULL;
106 } 106 }
107 return url_request_->response_headers(); 107 return url_request_->response_headers();
108 } 108 }
109 109
110 std::string URLRequestAdapter::GetNegotiatedProtocol() const { 110 std::string URLRequestAdapter::GetNegotiatedProtocol() const {
111 if (url_request_ == NULL) 111 if (url_request_ == NULL)
112 return std::string(); 112 return std::string();
113 return url_request_->response_info().npn_negotiated_protocol; 113 return url_request_->response_info().alpn_negotiated_protocol;
114 } 114 }
115 115
116 bool URLRequestAdapter::GetWasCached() const { 116 bool URLRequestAdapter::GetWasCached() const {
117 if (url_request_ == NULL) 117 if (url_request_ == NULL)
118 return false; 118 return false;
119 return url_request_->response_info().was_cached; 119 return url_request_->response_info().was_cached;
120 } 120 }
121 121
122 void URLRequestAdapter::Start() { 122 void URLRequestAdapter::Start() {
123 context_->PostTaskToNetworkThread( 123 context_->PostTaskToNetworkThread(
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 unsigned char* URLRequestAdapter::Data() const { 324 unsigned char* URLRequestAdapter::Data() const {
325 DCHECK(OnNetworkThread()); 325 DCHECK(OnNetworkThread());
326 return reinterpret_cast<unsigned char*>(read_buffer_->data()); 326 return reinterpret_cast<unsigned char*>(read_buffer_->data());
327 } 327 }
328 328
329 bool URLRequestAdapter::OnNetworkThread() const { 329 bool URLRequestAdapter::OnNetworkThread() const {
330 return context_->GetNetworkTaskRunner()->BelongsToCurrentThread(); 330 return context_->GetNetworkTaskRunner()->BelongsToCurrentThread();
331 } 331 }
332 332
333 } // namespace cronet 333 } // namespace cronet
OLDNEW
« no previous file with comments | « components/cronet/android/cronet_url_request_adapter.cc ('k') | content/browser/loader/resource_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698