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

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

Issue 9693032: [uber page] Split up initialization of handlers from initialization of webui pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright bumps Created 8 years, 9 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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698