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

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

Issue 617393005: Make URLRequestContextAdapter initialization asynchronous (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 6 years, 2 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 #ifndef COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ 5 #ifndef COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_
6 #define COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ 6 #define COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // Returns a pointer to the downloaded data. 109 // Returns a pointer to the downloaded data.
110 unsigned char* Data() const; 110 unsigned char* Data() const;
111 111
112 // Get NPN or ALPN Negotiated Protocol (if any) from HttpResponseInfo. 112 // Get NPN or ALPN Negotiated Protocol (if any) from HttpResponseInfo.
113 std::string GetNegotiatedProtocol() const; 113 std::string GetNegotiatedProtocol() const;
114 114
115 virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE; 115 virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE;
116 116
117 virtual void OnReadCompleted(net::URLRequest* request, 117 virtual void OnReadCompleted(net::URLRequest* request,
118 int bytes_read) OVERRIDE; 118 int bytes_read) OVERRIDE;
119 bool OnNetworkThread() const;
xunjieli 2014/10/03 20:09:55 I made this public, coz URLRequestAdapter::OnDestr
mmenke 2014/10/03 20:26:58 nit: Add linebreak before method.
mmenke 2014/10/03 20:26:58 This is fine.
xunjieli 2014/10/03 20:39:52 Done.
119 120
120 private: 121 private:
121 static void OnDestroyRequest(URLRequestAdapter* self); 122 static void OnDestroyRequest(URLRequestAdapter* self);
122 123
123 void OnInitiateConnection(); 124 void OnInitiateConnection();
124 void OnCancelRequest(); 125 void OnCancelRequest();
125 void OnRequestSucceeded(); 126 void OnRequestSucceeded();
126 void OnRequestFailed(); 127 void OnRequestFailed();
127 void OnRequestCompleted(); 128 void OnRequestCompleted();
128 void OnRequestCanceled(); 129 void OnRequestCanceled();
(...skipping 20 matching lines...) Expand all
149 bool canceled_; 150 bool canceled_;
150 int64 expected_size_; 151 int64 expected_size_;
151 bool chunked_upload_; 152 bool chunked_upload_;
152 153
153 DISALLOW_COPY_AND_ASSIGN(URLRequestAdapter); 154 DISALLOW_COPY_AND_ASSIGN(URLRequestAdapter);
154 }; 155 };
155 156
156 } // namespace cronet 157 } // namespace cronet
157 158
158 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_ 159 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698