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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 l10n_util::GetStringUTF16(IDS_CLOSE)); | 541 l10n_util::GetStringUTF16(IDS_CLOSE)); |
542 localized_strings->SetString("ownerOnly", l10n_util::GetStringUTF16( | 542 localized_strings->SetString("ownerOnly", l10n_util::GetStringUTF16( |
543 IDS_OPTIONS_ACCOUNTS_OWNER_ONLY)); | 543 IDS_OPTIONS_ACCOUNTS_OWNER_ONLY)); |
544 std::string owner; | 544 std::string owner; |
545 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner); | 545 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner); |
546 localized_strings->SetString("ownerUserId", UTF8ToUTF16(owner)); | 546 localized_strings->SetString("ownerUserId", UTF8ToUTF16(owner)); |
547 | 547 |
548 FillNetworkInfo(localized_strings); | 548 FillNetworkInfo(localized_strings); |
549 } | 549 } |
550 | 550 |
551 void InternetOptionsHandler::Initialize() { | 551 void InternetOptionsHandler::InitializeHandler() { |
552 cros_->RequestNetworkScan(); | 552 cros_->RequestNetworkScan(); |
553 } | 553 } |
554 | 554 |
555 void InternetOptionsHandler::RegisterMessages() { | 555 void InternetOptionsHandler::RegisterMessages() { |
556 // Setup handlers specific to this panel. | 556 // Setup handlers specific to this panel. |
557 web_ui()->RegisterMessageCallback("buttonClickCallback", | 557 web_ui()->RegisterMessageCallback("buttonClickCallback", |
558 base::Bind(&InternetOptionsHandler::ButtonClickCallback, | 558 base::Bind(&InternetOptionsHandler::ButtonClickCallback, |
559 base::Unretained(this))); | 559 base::Unretained(this))); |
560 web_ui()->RegisterMessageCallback("refreshCellularPlan", | 560 web_ui()->RegisterMessageCallback("refreshCellularPlan", |
561 base::Bind(&InternetOptionsHandler::RefreshCellularPlanCallback, | 561 base::Bind(&InternetOptionsHandler::RefreshCellularPlanCallback, |
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 value_dict->Set("value", value); | 1409 value_dict->Set("value", value); |
1410 const base::Value* default_value = ui_data.default_value(); | 1410 const base::Value* default_value = ui_data.default_value(); |
1411 if (default_value) | 1411 if (default_value) |
1412 value_dict->Set("default", default_value->DeepCopy()); | 1412 value_dict->Set("default", default_value->DeepCopy()); |
1413 if (ui_data.managed()) | 1413 if (ui_data.managed()) |
1414 value_dict->SetString("controlledBy", "policy"); | 1414 value_dict->SetString("controlledBy", "policy"); |
1415 else if (ui_data.recommended()) | 1415 else if (ui_data.recommended()) |
1416 value_dict->SetString("controlledBy", "recommended"); | 1416 value_dict->SetString("controlledBy", "recommended"); |
1417 settings->Set(key, value_dict); | 1417 settings->Set(key, value_dict); |
1418 } | 1418 } |
OLD | NEW |