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

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

Issue 2102903004: [Cronet] Unregister NetLog observer during shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | components/cronet/android/cronet_url_request_context_adapter.cc » ('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 COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_ 5 #ifndef COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_
6 #define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_ 6 #define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void OnRTTObservation(int32_t rtt_ms, 154 void OnRTTObservation(int32_t rtt_ms,
155 const base::TimeTicks& timestamp, 155 const base::TimeTicks& timestamp,
156 net::NetworkQualityObservationSource source) override; 156 net::NetworkQualityObservationSource source) override;
157 157
158 // net::NetworkQualityEstimator::ThroughputObserver implementation. 158 // net::NetworkQualityEstimator::ThroughputObserver implementation.
159 void OnThroughputObservation( 159 void OnThroughputObservation(
160 int32_t throughput_kbps, 160 int32_t throughput_kbps,
161 const base::TimeTicks& timestamp, 161 const base::TimeTicks& timestamp,
162 net::NetworkQualityObservationSource source) override; 162 net::NetworkQualityObservationSource source) override;
163 163
164 // Helper method to stop NetLog logging to file. This can be called on any
165 // thread. This will flush any remaining writes to disk.
166 void StopNetLogHelper();
167
164 // Network thread is owned by |this|, but is destroyed from java thread. 168 // Network thread is owned by |this|, but is destroyed from java thread.
165 base::Thread* network_thread_; 169 base::Thread* network_thread_;
166 170
167 // File thread should be destroyed last. 171 // File thread should be destroyed last.
168 std::unique_ptr<base::Thread> file_thread_; 172 std::unique_ptr<base::Thread> file_thread_;
169 173
170 // |write_to_file_observer_| should only be accessed with 174 // |write_to_file_observer_| should only be accessed with
171 // |write_to_file_observer_lock_|. 175 // |write_to_file_observer_lock_|.
172 std::unique_ptr<net::WriteToFileNetLogObserver> write_to_file_observer_; 176 std::unique_ptr<net::WriteToFileNetLogObserver> write_to_file_observer_;
173 base::Lock write_to_file_observer_lock_; 177 base::Lock write_to_file_observer_lock_;
(...skipping 28 matching lines...) Expand all
202 #if defined(DATA_REDUCTION_PROXY_SUPPORT) 206 #if defined(DATA_REDUCTION_PROXY_SUPPORT)
203 std::unique_ptr<CronetDataReductionProxy> data_reduction_proxy_; 207 std::unique_ptr<CronetDataReductionProxy> data_reduction_proxy_;
204 #endif 208 #endif
205 209
206 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestContextAdapter); 210 DISALLOW_COPY_AND_ASSIGN(CronetURLRequestContextAdapter);
207 }; 211 };
208 212
209 } // namespace cronet 213 } // namespace cronet
210 214
211 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_ 215 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_CONTEXT_ADAPTER_H_
OLDNEW
« no previous file with comments | « no previous file | components/cronet/android/cronet_url_request_context_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698