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

Side by Side Diff: chrome/browser/ui/webui/about_ui.cc

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
Patch Set: fix android Created 6 years, 2 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
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/about_ui.h" 5 #include "chrome/browser/ui/webui/about_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 root->SetBoolean("show_other_browsers", 964 root->SetBoolean("show_other_browsers",
965 browser_defaults::kShowOtherBrowsersInAboutMemory); 965 browser_defaults::kShowOtherBrowsersInAboutMemory);
966 966
967 base::DictionaryValue load_time_data; 967 base::DictionaryValue load_time_data;
968 load_time_data.SetString( 968 load_time_data.SetString(
969 "summary_desc", 969 "summary_desc",
970 l10n_util::GetStringUTF16(IDS_MEMORY_USAGE_SUMMARY_DESC)); 970 l10n_util::GetStringUTF16(IDS_MEMORY_USAGE_SUMMARY_DESC));
971 webui::SetFontAndTextDirection(&load_time_data); 971 webui::SetFontAndTextDirection(&load_time_data);
972 load_time_data.Set("jstemplateData", root.release()); 972 load_time_data.Set("jstemplateData", root.release());
973 973
974 webui::UseVersion2 version2;
975 std::string data; 974 std::string data;
976 webui::AppendJsonJS(&load_time_data, &data); 975 webui::AppendJsonJS(&load_time_data, &data);
977 callback_.Run(base::RefCountedString::TakeString(&data)); 976 callback_.Run(base::RefCountedString::TakeString(&data));
978 } 977 }
979 978
980 } // namespace 979 } // namespace
981 980
982 // AboutUIHTMLSource ---------------------------------------------------------- 981 // AboutUIHTMLSource ----------------------------------------------------------
983 982
984 AboutUIHTMLSource::AboutUIHTMLSource(const std::string& source_name, 983 AboutUIHTMLSource::AboutUIHTMLSource(const std::string& source_name,
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 Profile* profile = Profile::FromWebUI(web_ui); 1094 Profile* profile = Profile::FromWebUI(web_ui);
1096 1095
1097 #if defined(ENABLE_THEMES) 1096 #if defined(ENABLE_THEMES)
1098 // Set up the chrome://theme/ source. 1097 // Set up the chrome://theme/ source.
1099 ThemeSource* theme = new ThemeSource(profile); 1098 ThemeSource* theme = new ThemeSource(profile);
1100 content::URLDataSource::Add(profile, theme); 1099 content::URLDataSource::Add(profile, theme);
1101 #endif 1100 #endif
1102 1101
1103 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); 1102 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile));
1104 } 1103 }
OLDNEW
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_interstitial.cc ('k') | chrome/browser/ui/webui/app_list/start_page_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698