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

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

Issue 12045022: Move code in ui\webui\jstemplate_builder.* to webui namespace for consistency. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc ('k') | chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698