OLD | NEW |
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/cronet_url_request_context_adapter.h" | 5 #include "components/cronet/android/cronet_url_request_context_adapter.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <limits.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 #include "net/sdch/sdch_owner.h" | 56 #include "net/sdch/sdch_owner.h" |
57 #include "net/ssl/channel_id_service.h" | 57 #include "net/ssl/channel_id_service.h" |
58 #include "net/url_request/url_request_context.h" | 58 #include "net/url_request/url_request_context.h" |
59 #include "net/url_request/url_request_context_builder.h" | 59 #include "net/url_request/url_request_context_builder.h" |
60 #include "net/url_request/url_request_interceptor.h" | 60 #include "net/url_request/url_request_interceptor.h" |
61 | 61 |
62 #if defined(DATA_REDUCTION_PROXY_SUPPORT) | 62 #if defined(DATA_REDUCTION_PROXY_SUPPORT) |
63 #include "components/cronet/android/cronet_data_reduction_proxy.h" | 63 #include "components/cronet/android/cronet_data_reduction_proxy.h" |
64 #endif | 64 #endif |
65 | 65 |
| 66 using base::android::JavaParamRef; |
| 67 using base::android::ScopedJavaLocalRef; |
| 68 |
66 namespace { | 69 namespace { |
67 | 70 |
68 // This class wraps a NetLog that also contains network change events. | 71 // This class wraps a NetLog that also contains network change events. |
69 class NetLogWithNetworkChangeEvents { | 72 class NetLogWithNetworkChangeEvents { |
70 public: | 73 public: |
71 NetLogWithNetworkChangeEvents() {} | 74 NetLogWithNetworkChangeEvents() {} |
72 | 75 |
73 net::NetLog* net_log() { return &net_log_; } | 76 net::NetLog* net_log() { return &net_log_; } |
74 // This function registers with the NetworkChangeNotifier and so must be | 77 // This function registers with the NetworkChangeNotifier and so must be |
75 // called *after* the NetworkChangeNotifier is created. Should only be | 78 // called *after* the NetworkChangeNotifier is created. Should only be |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 JNIEnv* env, | 999 JNIEnv* env, |
997 const JavaParamRef<jclass>& jcaller) { | 1000 const JavaParamRef<jclass>& jcaller) { |
998 base::StatisticsRecorder::Initialize(); | 1001 base::StatisticsRecorder::Initialize(); |
999 std::vector<uint8_t> data; | 1002 std::vector<uint8_t> data; |
1000 if (!HistogramManager::GetInstance()->GetDeltas(&data)) | 1003 if (!HistogramManager::GetInstance()->GetDeltas(&data)) |
1001 return ScopedJavaLocalRef<jbyteArray>(); | 1004 return ScopedJavaLocalRef<jbyteArray>(); |
1002 return base::android::ToJavaByteArray(env, &data[0], data.size()); | 1005 return base::android::ToJavaByteArray(env, &data[0], data.size()); |
1003 } | 1006 } |
1004 | 1007 |
1005 } // namespace cronet | 1008 } // namespace cronet |
OLD | NEW |