| 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/chromeos/proxy_settings_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/proxy_settings_ui.h" |
| 6 | 6 |
| 7 #include "base/memory/ref_counted_memory.h" | 7 #include "base/memory/ref_counted_memory.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 SendResponse(request_id, base::RefCountedString::TakeString(&full_html)); | 70 SendResponse(request_id, base::RefCountedString::TakeString(&full_html)); |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace | 73 } // namespace |
| 74 | 74 |
| 75 namespace chromeos { | 75 namespace chromeos { |
| 76 | 76 |
| 77 ProxySettingsUI::ProxySettingsUI(content::WebUI* web_ui) | 77 ProxySettingsUI::ProxySettingsUI(content::WebUI* web_ui) |
| 78 : WebUIController(web_ui), | 78 : WebUIController(web_ui), |
| 79 proxy_handler_(new options2::ProxyHandler()), | 79 proxy_handler_(new options::ProxyHandler()), |
| 80 core_handler_(new options2::CoreChromeOSOptionsHandler()) { | 80 core_handler_(new options::CoreChromeOSOptionsHandler()) { |
| 81 // |localized_strings| will be owned by ProxySettingsHTMLSource. | 81 // |localized_strings| will be owned by ProxySettingsHTMLSource. |
| 82 DictionaryValue* localized_strings = new DictionaryValue(); | 82 DictionaryValue* localized_strings = new DictionaryValue(); |
| 83 | 83 |
| 84 core_handler_->set_handlers_host(this); | 84 core_handler_->set_handlers_host(this); |
| 85 core_handler_->GetLocalizedValues(localized_strings); | 85 core_handler_->GetLocalizedValues(localized_strings); |
| 86 web_ui->AddMessageHandler(core_handler_); | 86 web_ui->AddMessageHandler(core_handler_); |
| 87 | 87 |
| 88 proxy_handler_->GetLocalizedValues(localized_strings); | 88 proxy_handler_->GetLocalizedValues(localized_strings); |
| 89 web_ui->AddMessageHandler(proxy_handler_); | 89 web_ui->AddMessageHandler(proxy_handler_); |
| 90 | 90 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 107 core_handler_->InitializePage(); | 107 core_handler_->InitializePage(); |
| 108 proxy_handler_->InitializePage(); | 108 proxy_handler_->InitializePage(); |
| 109 Profile* profile = Profile::FromWebUI(web_ui()); | 109 Profile* profile = Profile::FromWebUI(web_ui()); |
| 110 PrefProxyConfigTracker* proxy_tracker = profile->GetProxyConfigTracker(); | 110 PrefProxyConfigTracker* proxy_tracker = profile->GetProxyConfigTracker(); |
| 111 proxy_tracker->UIMakeActiveNetworkCurrent(); | 111 proxy_tracker->UIMakeActiveNetworkCurrent(); |
| 112 std::string network_name; | 112 std::string network_name; |
| 113 proxy_tracker->UIGetCurrentNetworkName(&network_name); | 113 proxy_tracker->UIGetCurrentNetworkName(&network_name); |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace chromeos | 116 } // namespace chromeos |
| OLD | NEW |