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

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

Issue 13945023: Make URLDataSource::GetSource() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And another one. Created 7 years, 8 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
« no previous file with comments | « chrome/browser/ui/webui/about_ui.h ('k') | chrome/browser/ui/webui/app_launcher_page_ui.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 959
960 // AboutUIHTMLSource ---------------------------------------------------------- 960 // AboutUIHTMLSource ----------------------------------------------------------
961 961
962 AboutUIHTMLSource::AboutUIHTMLSource(const std::string& source_name, 962 AboutUIHTMLSource::AboutUIHTMLSource(const std::string& source_name,
963 Profile* profile) 963 Profile* profile)
964 : source_name_(source_name), 964 : source_name_(source_name),
965 profile_(profile) {} 965 profile_(profile) {}
966 966
967 AboutUIHTMLSource::~AboutUIHTMLSource() {} 967 AboutUIHTMLSource::~AboutUIHTMLSource() {}
968 968
969 std::string AboutUIHTMLSource::GetSource() { 969 std::string AboutUIHTMLSource::GetSource() const {
970 return source_name_; 970 return source_name_;
971 } 971 }
972 972
973 void AboutUIHTMLSource::StartDataRequest( 973 void AboutUIHTMLSource::StartDataRequest(
974 const std::string& path, 974 const std::string& path,
975 bool is_incognito, 975 bool is_incognito,
976 const content::URLDataSource::GotDataCallback& callback) { 976 const content::URLDataSource::GotDataCallback& callback) {
977 std::string response; 977 std::string response;
978 // Add your data source here, in alphabetical order. 978 // Add your data source here, in alphabetical order.
979 if (source_name_ == chrome::kChromeUIChromeURLsHost) { 979 if (source_name_ == chrome::kChromeUIChromeURLsHost) {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 Profile* profile = Profile::FromWebUI(web_ui); 1067 Profile* profile = Profile::FromWebUI(web_ui);
1068 1068
1069 #if defined(ENABLE_THEMES) 1069 #if defined(ENABLE_THEMES)
1070 // Set up the chrome://theme/ source. 1070 // Set up the chrome://theme/ source.
1071 ThemeSource* theme = new ThemeSource(profile); 1071 ThemeSource* theme = new ThemeSource(profile);
1072 content::URLDataSource::Add(profile, theme); 1072 content::URLDataSource::Add(profile, theme);
1073 #endif 1073 #endif
1074 1074
1075 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); 1075 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile));
1076 } 1076 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/about_ui.h ('k') | chrome/browser/ui/webui/app_launcher_page_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698