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

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

Issue 255333003: Renamed namespaces in src/net. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tue 04/29/2014 19:22:06.75 Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « net/proxy/proxy_bypass_rules.cc ('k') | net/proxy/proxy_resolver_v8.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 (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_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 21 matching lines...) Expand all
32 using base::android::ScopedJavaGlobalRef; 32 using base::android::ScopedJavaGlobalRef;
33 33
34 namespace net { 34 namespace net {
35 35
36 namespace { 36 namespace {
37 37
38 typedef ProxyConfigServiceAndroid::GetPropertyCallback GetPropertyCallback; 38 typedef ProxyConfigServiceAndroid::GetPropertyCallback GetPropertyCallback;
39 39
40 // Returns whether the provided string was successfully converted to a port. 40 // Returns whether the provided string was successfully converted to a port.
41 bool ConvertStringToPort(const std::string& port, int* output) { 41 bool ConvertStringToPort(const std::string& port, int* output) {
42 url_parse::Component component(0, port.size()); 42 url::Component component(0, port.size());
43 int result = url_parse::ParsePort(port.c_str(), component); 43 int result = url::ParsePort(port.c_str(), component);
44 if (result == url_parse::PORT_INVALID || 44 if (result == url::PORT_INVALID || result == url::PORT_UNSPECIFIED)
45 result == url_parse::PORT_UNSPECIFIED)
46 return false; 45 return false;
47 *output = result; 46 *output = result;
48 return true; 47 return true;
49 } 48 }
50 49
51 ProxyServer ConstructProxyServer(ProxyServer::Scheme scheme, 50 ProxyServer ConstructProxyServer(ProxyServer::Scheme scheme,
52 const std::string& proxy_host, 51 const std::string& proxy_host,
53 const std::string& proxy_port) { 52 const std::string& proxy_port) {
54 DCHECK(!proxy_host.empty()); 53 DCHECK(!proxy_host.empty());
55 int port_as_int = 0; 54 int port_as_int = 0;
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 network_task_runner, jni_task_runner, get_property_callback)) { 357 network_task_runner, jni_task_runner, get_property_callback)) {
359 delegate_->SetupJNI(); 358 delegate_->SetupJNI();
360 delegate_->FetchInitialConfig(); 359 delegate_->FetchInitialConfig();
361 } 360 }
362 361
363 void ProxyConfigServiceAndroid::ProxySettingsChanged() { 362 void ProxyConfigServiceAndroid::ProxySettingsChanged() {
364 delegate_->ProxySettingsChanged(); 363 delegate_->ProxySettingsChanged();
365 } 364 }
366 365
367 } // namespace net 366 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_bypass_rules.cc ('k') | net/proxy/proxy_resolver_v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698