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

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: Rebased. Created 7 years, 6 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 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 std::string properties_json; 1234 std::string properties_json;
1234 base::JSONWriter::WriteWithOptions(shill_properties, 1235 base::JSONWriter::WriteWithOptions(shill_properties,
1235 base::JSONWriter::OPTIONS_PRETTY_PRINT, 1236 base::JSONWriter::OPTIONS_PRETTY_PRINT,
1236 &properties_json); 1237 &properties_json);
1237 VLOG(2) << "Shill Properties: " << std::endl << properties_json; 1238 VLOG(2) << "Shill Properties: " << std::endl << properties_json;
1238 } 1239 }
1239 chromeos::Network* network = cros_->FindNetworkByPath(service_path); 1240 chromeos::Network* network = cros_->FindNetworkByPath(service_path);
1240 if (!network) 1241 if (!network)
1241 return; 1242 return;
1242 1243
1243 Profile::FromWebUI(web_ui())->GetProxyConfigTracker()->UISetCurrentNetwork( 1244 Profile::FromWebUI(web_ui())->
1244 service_path); 1245 GetProxyConfigTracker()->GetUIService().SetCurrentNetwork(service_path);
1245 1246
1246 const chromeos::NetworkUIData& ui_data = network->ui_data(); 1247 const chromeos::NetworkUIData& ui_data = network->ui_data();
1247 const chromeos::NetworkPropertyUIData property_ui_data(ui_data.onc_source()); 1248 const chromeos::NetworkPropertyUIData property_ui_data(ui_data.onc_source());
1248 const base::DictionaryValue* onc = 1249 const base::DictionaryValue* onc =
1249 cros_->FindOncForNetwork(network->unique_id()); 1250 cros_->FindOncForNetwork(network->unique_id());
1250 1251
1251 base::DictionaryValue dictionary; 1252 base::DictionaryValue dictionary;
1252 if (!hardware_address.empty()) 1253 if (!hardware_address.empty())
1253 dictionary.SetString(kTagHardwareAddress, hardware_address); 1254 dictionary.SetString(kTagHardwareAddress, hardware_address);
1254 1255
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 1791
1791 dictionary->SetBoolean(kTagWimaxEnabled, cros_->wimax_enabled()); 1792 dictionary->SetBoolean(kTagWimaxEnabled, cros_->wimax_enabled());
1792 dictionary->SetBoolean(kTagWimaxAvailable, cros_->wimax_available()); 1793 dictionary->SetBoolean(kTagWimaxAvailable, cros_->wimax_available());
1793 dictionary->SetBoolean(kTagWimaxBusy, false); // TODO(stevenj) remove. 1794 dictionary->SetBoolean(kTagWimaxBusy, false); // TODO(stevenj) remove.
1794 // TODO(kevers): The use of 'offline_mode' is not quite correct. Update once 1795 // TODO(kevers): The use of 'offline_mode' is not quite correct. Update once
1795 // we have proper back-end support. TODO(stevenj) remove. 1796 // we have proper back-end support. TODO(stevenj) remove.
1796 dictionary->SetBoolean(kTagAirplaneMode, cros_->offline_mode()); 1797 dictionary->SetBoolean(kTagAirplaneMode, cros_->offline_mode());
1797 } 1798 }
1798 1799
1799 } // namespace options 1800 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698