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

Side by Side Diff: chrome/browser/chromeos/proxy_config_service_impl.cc

Issue 11975015: This adds a private extension API to use for simple networking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Converting to ONC Created 7 years, 11 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
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 "chrome/browser/chromeos/proxy_config_service_impl.h" 5 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/json/json_string_value_serializer.h" 10 #include "base/json/json_string_value_serializer.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 return true; // editable if no network given. 96 return true; // editable if no network given.
97 97
98 NetworkLibrary* network_library = CrosLibrary::Get()->GetNetworkLibrary(); 98 NetworkLibrary* network_library = CrosLibrary::Get()->GetNetworkLibrary();
99 const base::DictionaryValue* onc = 99 const base::DictionaryValue* onc =
100 network_library->FindOncForNetwork(network->unique_id()); 100 network_library->FindOncForNetwork(network->unique_id());
101 101
102 NetworkPropertyUIData proxy_settings_ui_data; 102 NetworkPropertyUIData proxy_settings_ui_data;
103 proxy_settings_ui_data.ParseOncProperty( 103 proxy_settings_ui_data.ParseOncProperty(
104 network->ui_data(), 104 network->ui_data(),
105 onc, 105 onc,
106 onc::kProxySettings); 106 onc::network_config::kProxySettings);
107 return proxy_settings_ui_data.editable(); 107 return proxy_settings_ui_data.editable();
108 } 108 }
109 109
110 // Only unblock if needed for debugging. 110 // Only unblock if needed for debugging.
111 #if defined(NEED_DEBUG_LOG) 111 #if defined(NEED_DEBUG_LOG)
112 std::ostream& operator<<( 112 std::ostream& operator<<(
113 std::ostream& out, 113 std::ostream& out,
114 const ProxyConfigServiceImpl::ProxyConfig::ManualProxy& proxy) { 114 const ProxyConfigServiceImpl::ProxyConfig::ManualProxy& proxy) {
115 out << (proxy.server.is_valid() ? proxy.server.ToURI() : "") << "\n"; 115 out << (proxy.server.is_valid() ? proxy.server.ToURI() : "") << "\n";
116 return out; 116 return out;
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 device_config_.clear(); 846 device_config_.clear();
847 return; 847 return;
848 } 848 }
849 if (!active_network_.empty()) { 849 if (!active_network_.empty()) {
850 VLOG(1) << "Try migrating device config to " << active_network_; 850 VLOG(1) << "Try migrating device config to " << active_network_;
851 SetProxyConfigForNetwork(active_network_, device_config_, true); 851 SetProxyConfigForNetwork(active_network_, device_config_, true);
852 } 852 }
853 } 853 }
854 854
855 } // namespace chromeos 855 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698