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

Side by Side Diff: net/proxy/proxy_config_service_android.cc

Issue 897423002: Update {virtual,override,final} to follow C++11 style in net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/proxy/proxy_config_service_android.h" 5 #include "net/proxy/proxy_config_service_android.h"
6 6
7 #include <sys/system_properties.h> 7 #include <sys/system_properties.h>
8 8
9 #include "base/android/jni_array.h" 9 #include "base/android/jni_array.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 } 295 }
296 296
297 private: 297 private:
298 friend class base::RefCountedThreadSafe<Delegate>; 298 friend class base::RefCountedThreadSafe<Delegate>;
299 299
300 class JNIDelegateImpl : public ProxyConfigServiceAndroid::JNIDelegate { 300 class JNIDelegateImpl : public ProxyConfigServiceAndroid::JNIDelegate {
301 public: 301 public:
302 explicit JNIDelegateImpl(Delegate* delegate) : delegate_(delegate) {} 302 explicit JNIDelegateImpl(Delegate* delegate) : delegate_(delegate) {}
303 303
304 // ProxyConfigServiceAndroid::JNIDelegate overrides. 304 // ProxyConfigServiceAndroid::JNIDelegate overrides.
305 virtual void ProxySettingsChangedTo(JNIEnv* env, 305 void ProxySettingsChangedTo(JNIEnv* env,
306 jobject jself, 306 jobject jself,
307 jstring jhost, 307 jstring jhost,
308 jint jport, 308 jint jport,
309 jstring jpac_url, 309 jstring jpac_url,
310 jobjectArray jexclusion_list) override { 310 jobjectArray jexclusion_list) override {
311 std::string host = ConvertJavaStringToUTF8(env, jhost); 311 std::string host = ConvertJavaStringToUTF8(env, jhost);
312 std::string pac_url; 312 std::string pac_url;
313 if (jpac_url) 313 if (jpac_url)
314 ConvertJavaStringToUTF8(env, jpac_url, &pac_url); 314 ConvertJavaStringToUTF8(env, jpac_url, &pac_url);
315 std::vector<std::string> exclusion_list; 315 std::vector<std::string> exclusion_list;
316 base::android::AppendJavaStringArrayToStringVector( 316 base::android::AppendJavaStringArrayToStringVector(
317 env, jexclusion_list, &exclusion_list); 317 env, jexclusion_list, &exclusion_list);
318 delegate_->ProxySettingsChangedTo(host, jport, pac_url, exclusion_list); 318 delegate_->ProxySettingsChangedTo(host, jport, pac_url, exclusion_list);
319 } 319 }
320 320
321 virtual void ProxySettingsChanged(JNIEnv* env, jobject self) override { 321 void ProxySettingsChanged(JNIEnv* env, jobject self) override {
322 delegate_->ProxySettingsChanged(); 322 delegate_->ProxySettingsChanged();
323 } 323 }
324 324
325 private: 325 private:
326 Delegate* const delegate_; 326 Delegate* const delegate_;
327 }; 327 };
328 328
329 virtual ~Delegate() {} 329 virtual ~Delegate() {}
330 330
331 void ShutdownOnJNIThread() { 331 void ShutdownOnJNIThread() {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 network_task_runner, jni_task_runner, get_property_callback)) { 408 network_task_runner, jni_task_runner, get_property_callback)) {
409 delegate_->SetupJNI(); 409 delegate_->SetupJNI();
410 delegate_->FetchInitialConfig(); 410 delegate_->FetchInitialConfig();
411 } 411 }
412 412
413 void ProxyConfigServiceAndroid::ProxySettingsChanged() { 413 void ProxyConfigServiceAndroid::ProxySettingsChanged() {
414 delegate_->ProxySettingsChanged(); 414 delegate_->ProxySettingsChanged();
415 } 415 }
416 416
417 } // namespace net 417 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_android.h ('k') | net/proxy/proxy_config_service_android_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698