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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc

Issue 14846004: Migrate ProxyConfigServiceImpl to NetworkStateHandler and NetworkProfileHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed profile_manager_unittest.cc Created 7 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
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/ui/webui/options/chromeos/internet_options_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 20 matching lines...) Expand all
31 #include "chrome/browser/chromeos/cros/network_library.h" 31 #include "chrome/browser/chromeos/cros/network_library.h"
32 #include "chrome/browser/chromeos/cros/network_property_ui_data.h" 32 #include "chrome/browser/chromeos/cros/network_property_ui_data.h"
33 #include "chrome/browser/chromeos/enrollment_dialog_view.h" 33 #include "chrome/browser/chromeos/enrollment_dialog_view.h"
34 #include "chrome/browser/chromeos/mobile_config.h" 34 #include "chrome/browser/chromeos/mobile_config.h"
35 #include "chrome/browser/chromeos/options/network_config_view.h" 35 #include "chrome/browser/chromeos/options/network_config_view.h"
36 #include "chrome/browser/chromeos/options/network_connect.h" 36 #include "chrome/browser/chromeos/options/network_connect.h"
37 #include "chrome/browser/chromeos/proxy_config_service_impl.h" 37 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
38 #include "chrome/browser/chromeos/settings/cros_settings.h" 38 #include "chrome/browser/chromeos/settings/cros_settings.h"
39 #include "chrome/browser/chromeos/sim_dialog_delegate.h" 39 #include "chrome/browser/chromeos/sim_dialog_delegate.h"
40 #include "chrome/browser/chromeos/status/network_menu_icon.h" 40 #include "chrome/browser/chromeos/status/network_menu_icon.h"
41 #include "chrome/browser/chromeos/ui_proxy_config_service.h"
41 #include "chrome/browser/net/pref_proxy_config_tracker.h" 42 #include "chrome/browser/net/pref_proxy_config_tracker.h"
42 #include "chrome/browser/profiles/profile.h" 43 #include "chrome/browser/profiles/profile.h"
43 #include "chrome/browser/profiles/profile_manager.h" 44 #include "chrome/browser/profiles/profile_manager.h"
44 #include "chrome/browser/ui/browser.h" 45 #include "chrome/browser/ui/browser.h"
45 #include "chrome/browser/ui/browser_finder.h" 46 #include "chrome/browser/ui/browser_finder.h"
46 #include "chrome/browser/ui/browser_window.h" 47 #include "chrome/browser/ui/browser_window.h"
47 #include "chrome/browser/ui/host_desktop.h" 48 #include "chrome/browser/ui/host_desktop.h"
48 #include "chrome/browser/ui/singleton_tabs.h" 49 #include "chrome/browser/ui/singleton_tabs.h"
49 #include "chrome/common/chrome_notification_types.h" 50 #include "chrome/common/chrome_notification_types.h"
50 #include "chrome/common/time_format.h" 51 #include "chrome/common/time_format.h"
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 std::string properties_json; 1259 std::string properties_json;
1259 base::JSONWriter::WriteWithOptions(shill_properties, 1260 base::JSONWriter::WriteWithOptions(shill_properties,
1260 base::JSONWriter::OPTIONS_PRETTY_PRINT, 1261 base::JSONWriter::OPTIONS_PRETTY_PRINT,
1261 &properties_json); 1262 &properties_json);
1262 VLOG(2) << "Shill Properties: " << std::endl << properties_json; 1263 VLOG(2) << "Shill Properties: " << std::endl << properties_json;
1263 } 1264 }
1264 chromeos::Network* network = cros_->FindNetworkByPath(service_path); 1265 chromeos::Network* network = cros_->FindNetworkByPath(service_path);
1265 if (!network) 1266 if (!network)
1266 return; 1267 return;
1267 1268
1268 Profile::FromWebUI(web_ui())->GetProxyConfigTracker()->UISetCurrentNetwork( 1269 Profile::FromWebUI(web_ui())->
1269 service_path); 1270 GetProxyConfigTracker()->GetUIService().SetCurrentNetwork(service_path);
1270 1271
1271 const chromeos::NetworkUIData& ui_data = network->ui_data(); 1272 const chromeos::NetworkUIData& ui_data = network->ui_data();
1272 const chromeos::NetworkPropertyUIData property_ui_data(ui_data.onc_source()); 1273 const chromeos::NetworkPropertyUIData property_ui_data(ui_data.onc_source());
1273 const base::DictionaryValue* onc = 1274 const base::DictionaryValue* onc =
1274 cros_->FindOncForNetwork(network->unique_id()); 1275 cros_->FindOncForNetwork(network->unique_id());
1275 1276
1276 base::DictionaryValue dictionary; 1277 base::DictionaryValue dictionary;
1277 if (!hardware_address.empty()) 1278 if (!hardware_address.empty())
1278 dictionary.SetString(kTagHardwareAddress, hardware_address); 1279 dictionary.SetString(kTagHardwareAddress, hardware_address);
1279 1280
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 1823
1823 dictionary->SetBoolean(kTagWimaxEnabled, cros_->wimax_enabled()); 1824 dictionary->SetBoolean(kTagWimaxEnabled, cros_->wimax_enabled());
1824 dictionary->SetBoolean(kTagWimaxAvailable, cros_->wimax_available()); 1825 dictionary->SetBoolean(kTagWimaxAvailable, cros_->wimax_available());
1825 dictionary->SetBoolean(kTagWimaxBusy, cros_->wimax_busy()); 1826 dictionary->SetBoolean(kTagWimaxBusy, cros_->wimax_busy());
1826 // TODO(kevers): The use of 'offline_mode' is not quite correct. Update once 1827 // TODO(kevers): The use of 'offline_mode' is not quite correct. Update once
1827 // we have proper back-end support. 1828 // we have proper back-end support.
1828 dictionary->SetBoolean(kTagAirplaneMode, cros_->offline_mode()); 1829 dictionary->SetBoolean(kTagAirplaneMode, cros_->offline_mode());
1829 } 1830 }
1830 1831
1831 } // namespace options 1832 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698