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

Unified Diff: chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc

Issue 9994005: Separate handler initialization from page initialization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes for chromeos Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc b/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
index 3c740748020b5c82b847ba34e84fe3a3e4adb2fa..44fc81cc8e143ceb471485affa0b076addf3ddea 100644
--- a/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
@@ -79,14 +79,23 @@ ProxySettingsUI::ProxySettingsUI(content::WebUI* web_ui)
core_handler_->set_handlers_host(this);
core_handler_->GetLocalizedValues(localized_strings);
web_ui->AddMessageHandler(core_handler_);
+ core_handler_->InitializeHandler();
proxy_handler_->GetLocalizedValues(localized_strings);
web_ui->AddMessageHandler(proxy_handler_);
+ proxy_handler_->InitializeHandler();
ProxySettingsHTMLSource* source =
new ProxySettingsHTMLSource(localized_strings);
Profile* profile = Profile::FromWebUI(web_ui);
profile->GetChromeURLDataManager()->AddDataSource(source);
+
+ PrefProxyConfigTracker* proxy_tracker = profile->GetProxyConfigTracker();
+ proxy_tracker->UIMakeActiveNetworkCurrent();
Dan Beam 2012/04/09 20:13:24 If this is doing anything involving the page it sh
+
+ std::string network_name;
+ proxy_tracker->UIGetCurrentNetworkName(&network_name);
+ proxy_handler_->SetNetworkName(network_name);
Dan Beam 2012/04/09 20:13:24 I don't think this currently does anything, btw...
}
ProxySettingsUI::~ProxySettingsUI() {
@@ -96,17 +105,9 @@ ProxySettingsUI::~ProxySettingsUI() {
proxy_handler_->Uninitialize();
}
-void ProxySettingsUI::InitializeHandlers() {
- core_handler_->InitializeHandler();
- proxy_handler_->InitializeHandler();
+void ProxySettingsUI::InitializePages() {
core_handler_->InitializePage();
proxy_handler_->InitializePage();
Tyler Breisacher (Chromium) 2012/04/09 18:19:28 If I'm not mistaken, both of these InitializePage(
Dan Beam 2012/04/09 20:04:23 They might not be no-op forever.
Dan Beam 2012/04/09 20:13:24 But additionally, there's nothing wrong this as fa
- Profile* profile = Profile::FromWebUI(web_ui());
- PrefProxyConfigTracker* proxy_tracker = profile->GetProxyConfigTracker();
- proxy_tracker->UIMakeActiveNetworkCurrent();
- std::string network_name;
- proxy_tracker->UIGetCurrentNetworkName(&network_name);
- proxy_handler_->SetNetworkName(network_name);
}
} // namespace chromeos
« no previous file with comments | « chrome/browser/ui/webui/chromeos/proxy_settings_ui.h ('k') | chrome/browser/ui/webui/options2/core_options_handler2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698