| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 void ProxySettingsHTMLSource::StartDataRequest( | 63 void ProxySettingsHTMLSource::StartDataRequest( |
| 64 const std::string& path, | 64 const std::string& path, |
| 65 bool is_incognito, | 65 bool is_incognito, |
| 66 const content::URLDataSource::GotDataCallback& callback) { | 66 const content::URLDataSource::GotDataCallback& callback) { |
| 67 web_ui_util::SetFontAndTextDirection(localized_strings_.get()); | 67 web_ui_util::SetFontAndTextDirection(localized_strings_.get()); |
| 68 | 68 |
| 69 static const base::StringPiece html( | 69 static const base::StringPiece html( |
| 70 ResourceBundle::GetSharedInstance().GetRawDataResource( | 70 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 71 IDR_PROXY_SETTINGS_HTML)); | 71 IDR_PROXY_SETTINGS_HTML)); |
| 72 std::string full_html = jstemplate_builder::GetI18nTemplateHtml( | 72 std::string full_html = webui::GetI18nTemplateHtml( |
| 73 html, localized_strings_.get()); | 73 html, localized_strings_.get()); |
| 74 | 74 |
| 75 callback.Run(base::RefCountedString::TakeString(&full_html)); | 75 callback.Run(base::RefCountedString::TakeString(&full_html)); |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace | 78 } // namespace |
| 79 | 79 |
| 80 namespace chromeos { | 80 namespace chromeos { |
| 81 | 81 |
| 82 ProxySettingsUI::ProxySettingsUI(content::WebUI* web_ui) | 82 ProxySettingsUI::ProxySettingsUI(content::WebUI* web_ui) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 112 core_handler_->InitializePage(); | 112 core_handler_->InitializePage(); |
| 113 proxy_handler_->InitializePage(); | 113 proxy_handler_->InitializePage(); |
| 114 Profile* profile = Profile::FromWebUI(web_ui()); | 114 Profile* profile = Profile::FromWebUI(web_ui()); |
| 115 PrefProxyConfigTracker* proxy_tracker = profile->GetProxyConfigTracker(); | 115 PrefProxyConfigTracker* proxy_tracker = profile->GetProxyConfigTracker(); |
| 116 proxy_tracker->UIMakeActiveNetworkCurrent(); | 116 proxy_tracker->UIMakeActiveNetworkCurrent(); |
| 117 std::string network_name; | 117 std::string network_name; |
| 118 proxy_tracker->UIGetCurrentNetworkName(&network_name); | 118 proxy_tracker->UIGetCurrentNetworkName(&network_name); |
| 119 } | 119 } |
| 120 | 120 |
| 121 } // namespace chromeos | 121 } // namespace chromeos |
| OLD | NEW |