| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 DCHECK(localized_strings); | 204 DCHECK(localized_strings); |
| 205 internet_options_strings::RegisterLocalizedStrings(localized_strings); | 205 internet_options_strings::RegisterLocalizedStrings(localized_strings); |
| 206 | 206 |
| 207 // TODO(stevenjb): Find a better way to populate initial data before | 207 // TODO(stevenjb): Find a better way to populate initial data before |
| 208 // InitializePage() gets called. | 208 // InitializePage() gets called. |
| 209 std::string owner; | 209 std::string owner; |
| 210 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner); | 210 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner); |
| 211 bool logged_in_as_owner = LoginState::Get()->GetLoggedInUserType() == | 211 bool logged_in_as_owner = LoginState::Get()->GetLoggedInUserType() == |
| 212 LoginState::LOGGED_IN_USER_OWNER; | 212 LoginState::LOGGED_IN_USER_OWNER; |
| 213 localized_strings->SetBoolean(kLoggedInAsOwnerKey, logged_in_as_owner); | 213 localized_strings->SetBoolean(kLoggedInAsOwnerKey, logged_in_as_owner); |
| 214 // TODO(anujsharma): Remove kShowCarrierSelectKey, as it is not |
| 215 // required anymore. |
| 214 localized_strings->SetBoolean( | 216 localized_strings->SetBoolean( |
| 215 kShowCarrierSelectKey, base::CommandLine::ForCurrentProcess()->HasSwitch( | 217 kShowCarrierSelectKey, false); |
| 216 chromeos::switches::kEnableCarrierSwitching)); | |
| 217 | 218 |
| 218 base::DictionaryValue* network_dictionary = new base::DictionaryValue; | 219 base::DictionaryValue* network_dictionary = new base::DictionaryValue; |
| 219 FillNetworkInfo(network_dictionary); | 220 FillNetworkInfo(network_dictionary); |
| 220 localized_strings->Set(kNetworkDataKey, network_dictionary); | 221 localized_strings->Set(kNetworkDataKey, network_dictionary); |
| 221 } | 222 } |
| 222 | 223 |
| 223 void InternetOptionsHandler::InitializePage() { | 224 void InternetOptionsHandler::InitializePage() { |
| 224 UpdateVPNProviders(); | 225 UpdateVPNProviders(); |
| 225 NetworkHandler::Get()->network_state_handler()->RequestScan(); | 226 NetworkHandler::Get()->network_state_handler()->RequestScan(); |
| 226 RefreshNetworkData(); | 227 RefreshNetworkData(); |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 dictionary->SetBoolean(kTagCellularSupportsScan, | 570 dictionary->SetBoolean(kTagCellularSupportsScan, |
| 570 cellular && cellular->support_network_scan()); | 571 cellular && cellular->support_network_scan()); |
| 571 dictionary->SetBoolean(kTagCellularSimAbsent, | 572 dictionary->SetBoolean(kTagCellularSimAbsent, |
| 572 cellular && cellular->IsSimAbsent()); | 573 cellular && cellular->IsSimAbsent()); |
| 573 dictionary->SetString(kTagCellularSimLockType, | 574 dictionary->SetString(kTagCellularSimLockType, |
| 574 cellular ? cellular->sim_lock_type() : ""); | 575 cellular ? cellular->sim_lock_type() : ""); |
| 575 } | 576 } |
| 576 | 577 |
| 577 } // namespace options | 578 } // namespace options |
| 578 } // namespace chromeos | 579 } // namespace chromeos |
| OLD | NEW |