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

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

Issue 11756002: Move cros_network_functions.cc to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clang fixes 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/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 10 matching lines...) Expand all
21 #include "base/json/json_writer.h" 21 #include "base/json/json_writer.h"
22 #include "base/string16.h" 22 #include "base/string16.h"
23 #include "base/string_number_conversions.h" 23 #include "base/string_number_conversions.h"
24 #include "base/stringprintf.h" 24 #include "base/stringprintf.h"
25 #include "base/time.h" 25 #include "base/time.h"
26 #include "base/utf_string_conversions.h" 26 #include "base/utf_string_conversions.h"
27 #include "base/values.h" 27 #include "base/values.h"
28 #include "chrome/browser/browser_process.h" 28 #include "chrome/browser/browser_process.h"
29 #include "chrome/browser/chromeos/choose_mobile_network_dialog.h" 29 #include "chrome/browser/chromeos/choose_mobile_network_dialog.h"
30 #include "chrome/browser/chromeos/cros/cros_library.h" 30 #include "chrome/browser/chromeos/cros/cros_library.h"
31 #include "chrome/browser/chromeos/cros/cros_network_functions.h"
32 #include "chrome/browser/chromeos/cros/network_library.h" 31 #include "chrome/browser/chromeos/cros/network_library.h"
33 #include "chrome/browser/chromeos/enrollment_dialog_view.h" 32 #include "chrome/browser/chromeos/enrollment_dialog_view.h"
34 #include "chrome/browser/chromeos/mobile_config.h" 33 #include "chrome/browser/chromeos/mobile_config.h"
35 #include "chrome/browser/chromeos/options/network_config_view.h" 34 #include "chrome/browser/chromeos/options/network_config_view.h"
36 #include "chrome/browser/chromeos/proxy_config_service_impl.h" 35 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
37 #include "chrome/browser/chromeos/settings/cros_settings.h" 36 #include "chrome/browser/chromeos/settings/cros_settings.h"
38 #include "chrome/browser/chromeos/sim_dialog_delegate.h" 37 #include "chrome/browser/chromeos/sim_dialog_delegate.h"
39 #include "chrome/browser/chromeos/status/network_menu_icon.h" 38 #include "chrome/browser/chromeos/status/network_menu_icon.h"
40 #include "chrome/browser/net/pref_proxy_config_tracker.h" 39 #include "chrome/browser/net/pref_proxy_config_tracker.h"
41 #include "chrome/browser/profiles/profile.h" 40 #include "chrome/browser/profiles/profile.h"
42 #include "chrome/browser/profiles/profile_manager.h" 41 #include "chrome/browser/profiles/profile_manager.h"
43 #include "chrome/browser/ui/browser.h" 42 #include "chrome/browser/ui/browser.h"
44 #include "chrome/browser/ui/browser_finder.h" 43 #include "chrome/browser/ui/browser_finder.h"
45 #include "chrome/browser/ui/browser_window.h" 44 #include "chrome/browser/ui/browser_window.h"
46 #include "chrome/browser/ui/host_desktop.h" 45 #include "chrome/browser/ui/host_desktop.h"
47 #include "chrome/browser/ui/singleton_tabs.h" 46 #include "chrome/browser/ui/singleton_tabs.h"
48 #include "chrome/browser/ui/webui/web_ui_util.h" 47 #include "chrome/browser/ui/webui/web_ui_util.h"
49 #include "chrome/common/chrome_notification_types.h" 48 #include "chrome/common/chrome_notification_types.h"
50 #include "chrome/common/chrome_switches.h" 49 #include "chrome/common/chrome_switches.h"
51 #include "chrome/common/time_format.h" 50 #include "chrome/common/time_format.h"
51 #include "chromeos/network/network_ip_config.h"
52 #include "chromeos/network/network_util.h"
52 #include "chromeos/network/onc/onc_constants.h" 53 #include "chromeos/network/onc/onc_constants.h"
53 #include "content/public/browser/notification_service.h" 54 #include "content/public/browser/notification_service.h"
54 #include "content/public/browser/web_contents.h" 55 #include "content/public/browser/web_contents.h"
55 #include "content/public/browser/web_ui.h" 56 #include "content/public/browser/web_ui.h"
56 #include "grit/ash_resources.h" 57 #include "grit/ash_resources.h"
57 #include "grit/chromium_strings.h" 58 #include "grit/chromium_strings.h"
58 #include "grit/generated_resources.h" 59 #include "grit/generated_resources.h"
59 #include "grit/locale_settings.h" 60 #include "grit/locale_settings.h"
60 #include "grit/theme_resources.h" 61 #include "grit/theme_resources.h"
61 #include "third_party/cros_system_api/dbus/service_constants.h" 62 #include "third_party/cros_system_api/dbus/service_constants.h"
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 int routing_parameters = 0; 436 int routing_parameters = 0;
436 if (shill_properties.GetStringWithoutPathExpansion(address_key, &address)) { 437 if (shill_properties.GetStringWithoutPathExpansion(address_key, &address)) {
437 ip_info_dict->SetString(kIpConfigAddress, address); 438 ip_info_dict->SetString(kIpConfigAddress, address);
438 VLOG(2) << "Found " << address_key << ": " << address; 439 VLOG(2) << "Found " << address_key << ": " << address;
439 routing_parameters++; 440 routing_parameters++;
440 } 441 }
441 int prefix_len = -1; 442 int prefix_len = -1;
442 if (shill_properties.GetIntegerWithoutPathExpansion( 443 if (shill_properties.GetIntegerWithoutPathExpansion(
443 prefix_len_key, &prefix_len)) { 444 prefix_len_key, &prefix_len)) {
444 ip_info_dict->SetInteger(kIpConfigPrefixLength, prefix_len); 445 ip_info_dict->SetInteger(kIpConfigPrefixLength, prefix_len);
445 ip_info_dict->SetString(kIpConfigNetmask, 446 std::string netmask =
446 chromeos::CrosPrefixLengthToNetmask(prefix_len)); 447 chromeos::network_util::PrefixLengthToNetmask(prefix_len);
448 ip_info_dict->SetString(kIpConfigNetmask, netmask);
447 VLOG(2) << "Found " << prefix_len_key << ": " 449 VLOG(2) << "Found " << prefix_len_key << ": "
448 << prefix_len 450 << prefix_len << " (" << netmask << ")";
449 << " (" << chromeos::CrosPrefixLengthToNetmask(prefix_len) << ")";
450 routing_parameters++; 451 routing_parameters++;
451 } 452 }
452 std::string gateway; 453 std::string gateway;
453 if (shill_properties.GetStringWithoutPathExpansion(gateway_key, &gateway)) { 454 if (shill_properties.GetStringWithoutPathExpansion(gateway_key, &gateway)) {
454 ip_info_dict->SetString(kIpConfigGateway, gateway); 455 ip_info_dict->SetString(kIpConfigGateway, gateway);
455 VLOG(2) << "Found " << gateway_key << ": " << gateway; 456 VLOG(2) << "Found " << gateway_key << ": " << gateway;
456 routing_parameters++; 457 routing_parameters++;
457 } 458 }
458 if (routing_parameters_set) 459 if (routing_parameters_set)
459 *routing_parameters_set = routing_parameters; 460 *routing_parameters_set = routing_parameters;
(...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1759 1760
1760 dictionary->SetBoolean(kTagWimaxEnabled, cros_->wimax_enabled()); 1761 dictionary->SetBoolean(kTagWimaxEnabled, cros_->wimax_enabled());
1761 dictionary->SetBoolean(kTagWimaxAvailable, cros_->wimax_available()); 1762 dictionary->SetBoolean(kTagWimaxAvailable, cros_->wimax_available());
1762 dictionary->SetBoolean(kTagWimaxBusy, cros_->wimax_busy()); 1763 dictionary->SetBoolean(kTagWimaxBusy, cros_->wimax_busy());
1763 // TODO(kevers): The use of 'offline_mode' is not quite correct. Update once 1764 // TODO(kevers): The use of 'offline_mode' is not quite correct. Update once
1764 // we have proper back-end support. 1765 // we have proper back-end support.
1765 dictionary->SetBoolean(kTagAirplaneMode, cros_->offline_mode()); 1766 dictionary->SetBoolean(kTagAirplaneMode, cros_->offline_mode());
1766 } 1767 }
1767 1768
1768 } // namespace options 1769 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/internet_options_handler.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698