| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/chromeos/cros_settings.h" | 10 #include "chrome/browser/chromeos/cros_settings.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 } | 90 } |
| 91 | 91 |
| 92 ProxySettingsUI::~ProxySettingsUI() { | 92 ProxySettingsUI::~ProxySettingsUI() { |
| 93 // Uninitialize all registered handlers. The base class owns them and it will | 93 // Uninitialize all registered handlers. The base class owns them and it will |
| 94 // eventually delete them. | 94 // eventually delete them. |
| 95 core_handler_->Uninitialize(); | 95 core_handler_->Uninitialize(); |
| 96 proxy_handler_->Uninitialize(); | 96 proxy_handler_->Uninitialize(); |
| 97 } | 97 } |
| 98 | 98 |
| 99 void ProxySettingsUI::InitializeHandlers() { | 99 void ProxySettingsUI::InitializeHandlers() { |
| 100 core_handler_->Initialize(); | 100 core_handler_->InitializeHandler(); |
| 101 proxy_handler_->Initialize(); | 101 proxy_handler_->InitializeHandler(); |
| 102 core_handler_->InitializePage(); |
| 103 proxy_handler_->InitializePage(); |
| 102 Profile* profile = Profile::FromWebUI(web_ui()); | 104 Profile* profile = Profile::FromWebUI(web_ui()); |
| 103 PrefProxyConfigTracker* proxy_tracker = profile->GetProxyConfigTracker(); | 105 PrefProxyConfigTracker* proxy_tracker = profile->GetProxyConfigTracker(); |
| 104 proxy_tracker->UIMakeActiveNetworkCurrent(); | 106 proxy_tracker->UIMakeActiveNetworkCurrent(); |
| 105 std::string network_name; | 107 std::string network_name; |
| 106 proxy_tracker->UIGetCurrentNetworkName(&network_name); | 108 proxy_tracker->UIGetCurrentNetworkName(&network_name); |
| 107 proxy_handler_->SetNetworkName(network_name); | 109 proxy_handler_->SetNetworkName(network_name); |
| 108 } | 110 } |
| 109 | 111 |
| 110 } // namespace chromeos | 112 } // namespace chromeos |
| OLD | NEW |