OLD | NEW |
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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 internet_options_strings::RegisterLocalizedStrings(localized_strings); | 282 internet_options_strings::RegisterLocalizedStrings(localized_strings); |
283 | 283 |
284 // TODO(stevenjb): Find a better way to populate initial data before | 284 // TODO(stevenjb): Find a better way to populate initial data before |
285 // InitializePage() gets called. | 285 // InitializePage() gets called. |
286 std::string owner; | 286 std::string owner; |
287 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner); | 287 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner); |
288 bool logged_in_as_owner = LoginState::Get()->GetLoggedInUserType() == | 288 bool logged_in_as_owner = LoginState::Get()->GetLoggedInUserType() == |
289 LoginState::LOGGED_IN_USER_OWNER; | 289 LoginState::LOGGED_IN_USER_OWNER; |
290 localized_strings->SetBoolean(kLoggedInAsOwnerKey, logged_in_as_owner); | 290 localized_strings->SetBoolean(kLoggedInAsOwnerKey, logged_in_as_owner); |
291 localized_strings->SetBoolean( | 291 localized_strings->SetBoolean( |
292 kShowCarrierSelectKey, CommandLine::ForCurrentProcess()->HasSwitch( | 292 kShowCarrierSelectKey, base::CommandLine::ForCurrentProcess()->HasSwitch( |
293 chromeos::switches::kEnableCarrierSwitching)); | 293 chromeos::switches::kEnableCarrierSwitching)); |
294 | 294 |
295 base::DictionaryValue* network_dictionary = new base::DictionaryValue; | 295 base::DictionaryValue* network_dictionary = new base::DictionaryValue; |
296 FillNetworkInfo(network_dictionary); | 296 FillNetworkInfo(network_dictionary); |
297 localized_strings->Set(kNetworkDataKey, network_dictionary); | 297 localized_strings->Set(kNetworkDataKey, network_dictionary); |
298 } | 298 } |
299 | 299 |
300 void InternetOptionsHandler::InitializePage() { | 300 void InternetOptionsHandler::InitializePage() { |
301 base::DictionaryValue dictionary; | 301 base::DictionaryValue dictionary; |
302 dictionary.SetString(::onc::network_type::kCellular, | 302 dictionary.SetString(::onc::network_type::kCellular, |
303 GetIconDataUrl(IDR_AURA_UBER_TRAY_NETWORK_BARS_DARK)); | 303 GetIconDataUrl(IDR_AURA_UBER_TRAY_NETWORK_BARS_DARK)); |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 dictionary->SetBoolean( | 954 dictionary->SetBoolean( |
955 kTagWimaxAvailable, | 955 kTagWimaxAvailable, |
956 handler->IsTechnologyAvailable(NetworkTypePattern::Wimax())); | 956 handler->IsTechnologyAvailable(NetworkTypePattern::Wimax())); |
957 dictionary->SetBoolean( | 957 dictionary->SetBoolean( |
958 kTagWimaxEnabled, | 958 kTagWimaxEnabled, |
959 handler->IsTechnologyEnabled(NetworkTypePattern::Wimax())); | 959 handler->IsTechnologyEnabled(NetworkTypePattern::Wimax())); |
960 } | 960 } |
961 | 961 |
962 } // namespace options | 962 } // namespace options |
963 } // namespace chromeos | 963 } // namespace chromeos |
OLD | NEW |