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

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: Renamed ConfigStateToString. 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 19 matching lines...) Expand all
30 #include "chrome/browser/chromeos/cros/cros_library.h" 30 #include "chrome/browser/chromeos/cros/cros_library.h"
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/proxy_config_service_impl.h" 36 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
37 #include "chrome/browser/chromeos/settings/cros_settings.h" 37 #include "chrome/browser/chromeos/settings/cros_settings.h"
38 #include "chrome/browser/chromeos/sim_dialog_delegate.h" 38 #include "chrome/browser/chromeos/sim_dialog_delegate.h"
39 #include "chrome/browser/chromeos/status/network_menu_icon.h" 39 #include "chrome/browser/chromeos/status/network_menu_icon.h"
40 #include "chrome/browser/chromeos/ui_proxy_config_service.h"
40 #include "chrome/browser/net/pref_proxy_config_tracker.h" 41 #include "chrome/browser/net/pref_proxy_config_tracker.h"
41 #include "chrome/browser/profiles/profile.h" 42 #include "chrome/browser/profiles/profile.h"
42 #include "chrome/browser/profiles/profile_manager.h" 43 #include "chrome/browser/profiles/profile_manager.h"
43 #include "chrome/browser/ui/browser.h" 44 #include "chrome/browser/ui/browser.h"
44 #include "chrome/browser/ui/browser_finder.h" 45 #include "chrome/browser/ui/browser_finder.h"
45 #include "chrome/browser/ui/browser_window.h" 46 #include "chrome/browser/ui/browser_window.h"
46 #include "chrome/browser/ui/host_desktop.h" 47 #include "chrome/browser/ui/host_desktop.h"
47 #include "chrome/browser/ui/singleton_tabs.h" 48 #include "chrome/browser/ui/singleton_tabs.h"
48 #include "chrome/common/chrome_notification_types.h" 49 #include "chrome/common/chrome_notification_types.h"
49 #include "chrome/common/time_format.h" 50 #include "chrome/common/time_format.h"
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 std::string properties_json; 1258 std::string properties_json;
1258 base::JSONWriter::WriteWithOptions(shill_properties, 1259 base::JSONWriter::WriteWithOptions(shill_properties,
1259 base::JSONWriter::OPTIONS_PRETTY_PRINT, 1260 base::JSONWriter::OPTIONS_PRETTY_PRINT,
1260 &properties_json); 1261 &properties_json);
1261 VLOG(2) << "Shill Properties: " << std::endl << properties_json; 1262 VLOG(2) << "Shill Properties: " << std::endl << properties_json;
1262 } 1263 }
1263 chromeos::Network* network = cros_->FindNetworkByPath(service_path); 1264 chromeos::Network* network = cros_->FindNetworkByPath(service_path);
1264 if (!network) 1265 if (!network)
1265 return; 1266 return;
1266 1267
1267 Profile::FromWebUI(web_ui())->GetProxyConfigTracker()->UISetCurrentNetwork( 1268 Profile::FromWebUI(web_ui())->
1268 service_path); 1269 GetProxyConfigTracker()->GetUIService().SetCurrentNetwork(service_path);
1269 1270
1270 const chromeos::NetworkUIData& ui_data = network->ui_data(); 1271 const chromeos::NetworkUIData& ui_data = network->ui_data();
1271 const chromeos::NetworkPropertyUIData property_ui_data(ui_data.onc_source()); 1272 const chromeos::NetworkPropertyUIData property_ui_data(ui_data.onc_source());
1272 const base::DictionaryValue* onc = 1273 const base::DictionaryValue* onc =
1273 cros_->FindOncForNetwork(network->unique_id()); 1274 cros_->FindOncForNetwork(network->unique_id());
1274 1275
1275 base::DictionaryValue dictionary; 1276 base::DictionaryValue dictionary;
1276 if (!hardware_address.empty()) 1277 if (!hardware_address.empty())
1277 dictionary.SetString(kTagHardwareAddress, hardware_address); 1278 dictionary.SetString(kTagHardwareAddress, hardware_address);
1278 1279
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1872 1873
1873 dictionary->SetBoolean(kTagWimaxEnabled, cros_->wimax_enabled()); 1874 dictionary->SetBoolean(kTagWimaxEnabled, cros_->wimax_enabled());
1874 dictionary->SetBoolean(kTagWimaxAvailable, cros_->wimax_available()); 1875 dictionary->SetBoolean(kTagWimaxAvailable, cros_->wimax_available());
1875 dictionary->SetBoolean(kTagWimaxBusy, cros_->wimax_busy()); 1876 dictionary->SetBoolean(kTagWimaxBusy, cros_->wimax_busy());
1876 // TODO(kevers): The use of 'offline_mode' is not quite correct. Update once 1877 // TODO(kevers): The use of 'offline_mode' is not quite correct. Update once
1877 // we have proper back-end support. 1878 // we have proper back-end support.
1878 dictionary->SetBoolean(kTagAirplaneMode, cros_->offline_mode()); 1879 dictionary->SetBoolean(kTagAirplaneMode, cros_->offline_mode());
1879 } 1880 }
1880 1881
1881 } // namespace options 1882 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698