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

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

Issue 2237943002: Remove now-unnecessary .obj() in Java method calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@switch-context
Patch Set: Rebase *again* :( Created 4 years, 4 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/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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 pkp->host, pkp->expiration_date, pkp->include_subdomains, 704 pkp->host, pkp->expiration_date, pkp->include_subdomains,
705 pkp->pin_hashes, GURL::EmptyGURL()); 705 pkp->pin_hashes, GURL::EmptyGURL());
706 } 706 }
707 707
708 context_->transport_security_state() 708 context_->transport_security_state()
709 ->SetEnablePublicKeyPinningBypassForLocalTrustAnchors( 709 ->SetEnablePublicKeyPinningBypassForLocalTrustAnchors(
710 config->bypass_public_key_pinning_for_local_trust_anchors); 710 config->bypass_public_key_pinning_for_local_trust_anchors);
711 711
712 JNIEnv* env = base::android::AttachCurrentThread(); 712 JNIEnv* env = base::android::AttachCurrentThread();
713 jcronet_url_request_context_.Reset(env, jcronet_url_request_context.obj()); 713 jcronet_url_request_context_.Reset(env, jcronet_url_request_context.obj());
714 Java_CronetUrlRequestContext_initNetworkThread( 714 Java_CronetUrlRequestContext_initNetworkThread(env,
715 env, jcronet_url_request_context.obj()); 715 jcronet_url_request_context);
716 716
717 #if defined(DATA_REDUCTION_PROXY_SUPPORT) 717 #if defined(DATA_REDUCTION_PROXY_SUPPORT)
718 if (data_reduction_proxy_) 718 if (data_reduction_proxy_)
719 data_reduction_proxy_->Init(true, GetURLRequestContext()); 719 data_reduction_proxy_->Init(true, GetURLRequestContext());
720 #endif 720 #endif
721 is_context_initialized_ = true; 721 is_context_initialized_ = true;
722 while (!tasks_waiting_for_context_.empty()) { 722 while (!tasks_waiting_for_context_.empty()) {
723 tasks_waiting_for_context_.front().Run(); 723 tasks_waiting_for_context_.front().Run();
724 tasks_waiting_for_context_.pop(); 724 tasks_waiting_for_context_.pop();
725 } 725 }
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 Java_CronetUrlRequestContext_onEffectiveConnectionTypeChanged( 865 Java_CronetUrlRequestContext_onEffectiveConnectionTypeChanged(
866 base::android::AttachCurrentThread(), jcronet_url_request_context_.obj(), 866 base::android::AttachCurrentThread(), jcronet_url_request_context_.obj(),
867 effective_connection_type); 867 effective_connection_type);
868 } 868 }
869 869
870 void CronetURLRequestContextAdapter::OnRTTObservation( 870 void CronetURLRequestContextAdapter::OnRTTObservation(
871 int32_t rtt_ms, 871 int32_t rtt_ms,
872 const base::TimeTicks& timestamp, 872 const base::TimeTicks& timestamp,
873 net::NetworkQualityObservationSource source) { 873 net::NetworkQualityObservationSource source) {
874 Java_CronetUrlRequestContext_onRttObservation( 874 Java_CronetUrlRequestContext_onRttObservation(
875 base::android::AttachCurrentThread(), jcronet_url_request_context_.obj(), 875 base::android::AttachCurrentThread(), jcronet_url_request_context_,
876 rtt_ms, (timestamp - base::TimeTicks::UnixEpoch()).InMilliseconds(), 876 rtt_ms, (timestamp - base::TimeTicks::UnixEpoch()).InMilliseconds(),
877 source); 877 source);
878 } 878 }
879 879
880 void CronetURLRequestContextAdapter::OnThroughputObservation( 880 void CronetURLRequestContextAdapter::OnThroughputObservation(
881 int32_t throughput_kbps, 881 int32_t throughput_kbps,
882 const base::TimeTicks& timestamp, 882 const base::TimeTicks& timestamp,
883 net::NetworkQualityObservationSource source) { 883 net::NetworkQualityObservationSource source) {
884 Java_CronetUrlRequestContext_onThroughputObservation( 884 Java_CronetUrlRequestContext_onThroughputObservation(
885 base::android::AttachCurrentThread(), jcronet_url_request_context_.obj(), 885 base::android::AttachCurrentThread(), jcronet_url_request_context_,
886 throughput_kbps, 886 throughput_kbps,
887 (timestamp - base::TimeTicks::UnixEpoch()).InMilliseconds(), source); 887 (timestamp - base::TimeTicks::UnixEpoch()).InMilliseconds(), source);
888 } 888 }
889 889
890 void CronetURLRequestContextAdapter::StartNetLogToBoundedFileOnNetworkThread( 890 void CronetURLRequestContextAdapter::StartNetLogToBoundedFileOnNetworkThread(
891 const std::string& dir_path, 891 const std::string& dir_path,
892 bool include_socket_bytes, 892 bool include_socket_bytes,
893 int size) { 893 int size) {
894 DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread()); 894 DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread());
895 895
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 JNIEnv* env, 1069 JNIEnv* env,
1070 const JavaParamRef<jclass>& jcaller) { 1070 const JavaParamRef<jclass>& jcaller) {
1071 base::StatisticsRecorder::Initialize(); 1071 base::StatisticsRecorder::Initialize();
1072 std::vector<uint8_t> data; 1072 std::vector<uint8_t> data;
1073 if (!HistogramManager::GetInstance()->GetDeltas(&data)) 1073 if (!HistogramManager::GetInstance()->GetDeltas(&data))
1074 return ScopedJavaLocalRef<jbyteArray>(); 1074 return ScopedJavaLocalRef<jbyteArray>();
1075 return base::android::ToJavaByteArray(env, &data[0], data.size()); 1075 return base::android::ToJavaByteArray(env, &data[0], data.size());
1076 } 1076 }
1077 1077
1078 } // namespace cronet 1078 } // namespace cronet
OLDNEW
« no previous file with comments | « components/cronet/android/cronet_upload_data_stream_adapter.cc ('k') | components/cronet/android/test/sdch_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698