summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjered@chromium.org <jered@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-17 16:12:33 +0000
committerjered@chromium.org <jered@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-17 16:12:33 +0000
commit305b8e8c9152dc31b1e580f8442e70dd07d2137f (patch)
tree342ad0af9ec86c2e9369048a3b7448d8f4d54385
parent5504c56e63e603104f6a9870f3dd30f32eb29f74 (diff)
downloadchromium_src-305b8e8c9152dc31b1e580f8442e70dd07d2137f.zip
chromium_src-305b8e8c9152dc31b1e580f8442e70dd07d2137f.tar.gz
chromium_src-305b8e8c9152dc31b1e580f8442e70dd07d2137f.tar.bz2
Make URLDataSource::GetSource() const.
The method is logically const, all callers are already const, and I wanted to call this from a const method. BUG= Review URL: https://codereview.chromium.org/13945023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194605 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_setup_source.cc2
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_setup_source.h2
-rw-r--r--chrome/browser/search/local_ntp_source.cc2
-rw-r--r--chrome/browser/search/local_ntp_source.h2
-rw-r--r--chrome/browser/search/local_omnibox_popup_source.cc2
-rw-r--r--chrome/browser/search/local_omnibox_popup_source.h2
-rw-r--r--chrome/browser/ui/webui/about_ui.cc2
-rw-r--r--chrome/browser/ui/webui/about_ui.h2
-rw-r--r--chrome/browser/ui/webui/app_launcher_page_ui.cc2
-rw-r--r--chrome/browser/ui/webui/app_launcher_page_ui.h2
-rw-r--r--chrome/browser/ui/webui/bookmarks_ui.cc2
-rw-r--r--chrome/browser/ui/webui/bookmarks_ui.h2
-rw-r--r--chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc4
-rw-r--r--chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc4
-rw-r--r--chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc4
-rw-r--r--chrome/browser/ui/webui/chromeos/system_info_ui.cc4
-rw-r--r--chrome/browser/ui/webui/devtools_ui.cc4
-rw-r--r--chrome/browser/ui/webui/extensions/extension_icon_source.cc2
-rw-r--r--chrome/browser/ui/webui/extensions/extension_icon_source.h2
-rw-r--r--chrome/browser/ui/webui/favicon_source.cc2
-rw-r--r--chrome/browser/ui/webui/favicon_source.h2
-rw-r--r--chrome/browser/ui/webui/fileicon_source.cc2
-rw-r--r--chrome/browser/ui/webui/fileicon_source.h2
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_ui.cc2
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_ui.h2
-rw-r--r--chrome/browser/ui/webui/ntp/thumbnail_source.cc2
-rw-r--r--chrome/browser/ui/webui/ntp/thumbnail_source.h2
-rw-r--r--chrome/browser/ui/webui/options/chromeos/user_image_source.cc2
-rw-r--r--chrome/browser/ui/webui/options/chromeos/user_image_source.h2
-rw-r--r--chrome/browser/ui/webui/options/options_ui.cc4
-rw-r--r--chrome/browser/ui/webui/screenshot_source.cc2
-rw-r--r--chrome/browser/ui/webui/screenshot_source.h2
-rw-r--r--chrome/browser/ui/webui/session_favicon_source.cc2
-rw-r--r--chrome/browser/ui/webui/session_favicon_source.h2
-rw-r--r--chrome/browser/ui/webui/theme_source.cc2
-rw-r--r--chrome/browser/ui/webui/theme_source.h2
-rw-r--r--chrome/test/base/web_ui_browsertest.cc2
-rw-r--r--content/browser/webui/shared_resources_data_source.cc2
-rw-r--r--content/browser/webui/shared_resources_data_source.h2
-rw-r--r--content/browser/webui/web_ui_data_source_impl.cc4
-rw-r--r--content/browser/webui/web_ui_data_source_impl.h2
-rw-r--r--content/public/browser/url_data_source.h2
42 files changed, 49 insertions, 49 deletions
diff --git a/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc b/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc
index 8c18da8..6796607 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc
+++ b/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc
@@ -43,7 +43,7 @@ void AddString(DictionaryValue* dictionary,
CloudPrintSetupSource::CloudPrintSetupSource() {
}
-std::string CloudPrintSetupSource::GetSource() {
+std::string CloudPrintSetupSource::GetSource() const {
return chrome::kChromeUICloudPrintSetupHost;
}
diff --git a/chrome/browser/printing/cloud_print/cloud_print_setup_source.h b/chrome/browser/printing/cloud_print/cloud_print_setup_source.h
index 82e2f0b..f8af643 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_setup_source.h
+++ b/chrome/browser/printing/cloud_print/cloud_print_setup_source.h
@@ -14,7 +14,7 @@ class CloudPrintSetupSource : public content::URLDataSource {
CloudPrintSetupSource();
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
diff --git a/chrome/browser/search/local_ntp_source.cc b/chrome/browser/search/local_ntp_source.cc
index 38cbd7a..d11f5fe 100644
--- a/chrome/browser/search/local_ntp_source.cc
+++ b/chrome/browser/search/local_ntp_source.cc
@@ -31,7 +31,7 @@ LocalNtpSource::LocalNtpSource() {
LocalNtpSource::~LocalNtpSource() {
}
-std::string LocalNtpSource::GetSource() {
+std::string LocalNtpSource::GetSource() const {
return chrome::kChromeSearchLocalNtpHost;
}
diff --git a/chrome/browser/search/local_ntp_source.h b/chrome/browser/search/local_ntp_source.h
index 8e1a2eb..ec1fe7a 100644
--- a/chrome/browser/search/local_ntp_source.h
+++ b/chrome/browser/search/local_ntp_source.h
@@ -19,7 +19,7 @@ class LocalNtpSource : public content::URLDataSource {
virtual ~LocalNtpSource();
// Overridden from content::URLDataSource:
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
diff --git a/chrome/browser/search/local_omnibox_popup_source.cc b/chrome/browser/search/local_omnibox_popup_source.cc
index fa2d940..80d920f 100644
--- a/chrome/browser/search/local_omnibox_popup_source.cc
+++ b/chrome/browser/search/local_omnibox_popup_source.cc
@@ -32,7 +32,7 @@ LocalOmniboxPopupSource::LocalOmniboxPopupSource() {
LocalOmniboxPopupSource::~LocalOmniboxPopupSource() {
}
-std::string LocalOmniboxPopupSource::GetSource() {
+std::string LocalOmniboxPopupSource::GetSource() const {
return chrome::kChromeSearchLocalOmniboxPopupHost;
}
diff --git a/chrome/browser/search/local_omnibox_popup_source.h b/chrome/browser/search/local_omnibox_popup_source.h
index 2f2cd1c..b327fd4 100644
--- a/chrome/browser/search/local_omnibox_popup_source.h
+++ b/chrome/browser/search/local_omnibox_popup_source.h
@@ -19,7 +19,7 @@ class LocalOmniboxPopupSource : public content::URLDataSource {
virtual ~LocalOmniboxPopupSource();
// Overridden from content::URLDataSource:
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
diff --git a/chrome/browser/ui/webui/about_ui.cc b/chrome/browser/ui/webui/about_ui.cc
index b2dc2ae..64bc3b4 100644
--- a/chrome/browser/ui/webui/about_ui.cc
+++ b/chrome/browser/ui/webui/about_ui.cc
@@ -966,7 +966,7 @@ AboutUIHTMLSource::AboutUIHTMLSource(const std::string& source_name,
AboutUIHTMLSource::~AboutUIHTMLSource() {}
-std::string AboutUIHTMLSource::GetSource() {
+std::string AboutUIHTMLSource::GetSource() const {
return source_name_;
}
diff --git a/chrome/browser/ui/webui/about_ui.h b/chrome/browser/ui/webui/about_ui.h
index 8d8f665..b344d3d 100644
--- a/chrome/browser/ui/webui/about_ui.h
+++ b/chrome/browser/ui/webui/about_ui.h
@@ -22,7 +22,7 @@ class AboutUIHTMLSource : public content::URLDataSource {
AboutUIHTMLSource(const std::string& source_name, Profile* profile);
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
diff --git a/chrome/browser/ui/webui/app_launcher_page_ui.cc b/chrome/browser/ui/webui/app_launcher_page_ui.cc
index aeee5b0..1a18e84 100644
--- a/chrome/browser/ui/webui/app_launcher_page_ui.cc
+++ b/chrome/browser/ui/webui/app_launcher_page_ui.cc
@@ -86,7 +86,7 @@ AppLauncherPageUI::HTMLSource::HTMLSource(Profile* profile)
: profile_(profile) {
}
-std::string AppLauncherPageUI::HTMLSource::GetSource() {
+std::string AppLauncherPageUI::HTMLSource::GetSource() const {
return chrome::kChromeUIAppLauncherPageHost;
}
diff --git a/chrome/browser/ui/webui/app_launcher_page_ui.h b/chrome/browser/ui/webui/app_launcher_page_ui.h
index c25943e..7dbcdac 100644
--- a/chrome/browser/ui/webui/app_launcher_page_ui.h
+++ b/chrome/browser/ui/webui/app_launcher_page_ui.h
@@ -31,7 +31,7 @@ class AppLauncherPageUI : public content::WebUIController {
virtual ~HTMLSource();
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
diff --git a/chrome/browser/ui/webui/bookmarks_ui.cc b/chrome/browser/ui/webui/bookmarks_ui.cc
index a65dc82..243f521 100644
--- a/chrome/browser/ui/webui/bookmarks_ui.cc
+++ b/chrome/browser/ui/webui/bookmarks_ui.cc
@@ -22,7 +22,7 @@
BookmarksUIHTMLSource::BookmarksUIHTMLSource() {
}
-std::string BookmarksUIHTMLSource::GetSource() {
+std::string BookmarksUIHTMLSource::GetSource() const {
return chrome::kChromeUIBookmarksHost;
}
diff --git a/chrome/browser/ui/webui/bookmarks_ui.h b/chrome/browser/ui/webui/bookmarks_ui.h
index b3a8bba..4706406 100644
--- a/chrome/browser/ui/webui/bookmarks_ui.h
+++ b/chrome/browser/ui/webui/bookmarks_ui.h
@@ -22,7 +22,7 @@ class BookmarksUIHTMLSource : public content::URLDataSource {
BookmarksUIHTMLSource();
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
index 8484658..4cf7d78 100644
--- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
@@ -125,7 +125,7 @@ class MobileSetupUIHTMLSource : public content::URLDataSource {
MobileSetupUIHTMLSource();
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
@@ -217,7 +217,7 @@ class MobileSetupHandler
MobileSetupUIHTMLSource::MobileSetupUIHTMLSource() {
}
-std::string MobileSetupUIHTMLSource::GetSource() {
+std::string MobileSetupUIHTMLSource::GetSource() const {
return chrome::kChromeUIMobileSetupHost;
}
diff --git a/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc b/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
index e4b8e17..207c40c 100644
--- a/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
@@ -33,7 +33,7 @@ class ProxySettingsHTMLSource : public content::URLDataSource {
explicit ProxySettingsHTMLSource(DictionaryValue* localized_strings);
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
@@ -59,7 +59,7 @@ ProxySettingsHTMLSource::ProxySettingsHTMLSource(
: localized_strings_(localized_strings) {
}
-std::string ProxySettingsHTMLSource::GetSource() {
+std::string ProxySettingsHTMLSource::GetSource() const {
return chrome::kChromeUIProxySettingsHost;
}
diff --git a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
index 33405ac..3256ec3 100644
--- a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
@@ -76,7 +76,7 @@ class SimUnlockUIHTMLSource : public content::URLDataSource {
SimUnlockUIHTMLSource();
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
@@ -253,7 +253,7 @@ class SimUnlockHandler : public WebUIMessageHandler,
SimUnlockUIHTMLSource::SimUnlockUIHTMLSource() {
}
-std::string SimUnlockUIHTMLSource::GetSource() {
+std::string SimUnlockUIHTMLSource::GetSource() const {
return chrome::kChromeUISimUnlockHost;
}
diff --git a/chrome/browser/ui/webui/chromeos/system_info_ui.cc b/chrome/browser/ui/webui/chromeos/system_info_ui.cc
index 5d8e7b9..05eb734 100644
--- a/chrome/browser/ui/webui/chromeos/system_info_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/system_info_ui.cc
@@ -48,7 +48,7 @@ class SystemInfoUIHTMLSource : public content::URLDataSource{
SystemInfoUIHTMLSource();
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
@@ -101,7 +101,7 @@ SystemInfoUIHTMLSource::SystemInfoUIHTMLSource()
ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {
}
-std::string SystemInfoUIHTMLSource::GetSource() {
+std::string SystemInfoUIHTMLSource::GetSource() const {
return chrome::kChromeUISystemInfoHost;
}
diff --git a/chrome/browser/ui/webui/devtools_ui.cc b/chrome/browser/ui/webui/devtools_ui.cc
index 983ca4d..0be0422 100644
--- a/chrome/browser/ui/webui/devtools_ui.cc
+++ b/chrome/browser/ui/webui/devtools_ui.cc
@@ -97,7 +97,7 @@ class BundledDataSource : public content::URLDataSource {
}
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE {
+ virtual std::string GetSource() const OVERRIDE {
return chrome::kChromeUIDevToolsBundledHost;
}
@@ -139,7 +139,7 @@ class RemoteDataSource : public content::URLDataSource {
}
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE {
+ virtual std::string GetSource() const OVERRIDE {
return chrome::kChromeUIDevToolsRemoteHost;
}
diff --git a/chrome/browser/ui/webui/extensions/extension_icon_source.cc b/chrome/browser/ui/webui/extensions/extension_icon_source.cc
index 0139904..72ab222 100644
--- a/chrome/browser/ui/webui/extensions/extension_icon_source.cc
+++ b/chrome/browser/ui/webui/extensions/extension_icon_source.cc
@@ -105,7 +105,7 @@ SkBitmap* ExtensionIconSource::LoadImageByResourceId(int resource_id) {
return ToBitmap(data, contents.length());
}
-std::string ExtensionIconSource::GetSource() {
+std::string ExtensionIconSource::GetSource() const {
return chrome::kChromeUIExtensionIconHost;
}
diff --git a/chrome/browser/ui/webui/extensions/extension_icon_source.h b/chrome/browser/ui/webui/extensions/extension_icon_source.h
index 6485a24..93d2974 100644
--- a/chrome/browser/ui/webui/extensions/extension_icon_source.h
+++ b/chrome/browser/ui/webui/extensions/extension_icon_source.h
@@ -71,7 +71,7 @@ class ExtensionIconSource : public content::URLDataSource,
static SkBitmap* LoadImageByResourceId(int resource_id);
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual std::string GetMimeType(const std::string&) const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui/favicon_source.cc
index 232b6eb..20d1a3f 100644
--- a/chrome/browser/ui/webui/favicon_source.cc
+++ b/chrome/browser/ui/webui/favicon_source.cc
@@ -76,7 +76,7 @@ FaviconSource::FaviconSource(Profile* profile, IconType type)
FaviconSource::~FaviconSource() {
}
-std::string FaviconSource::GetSource() {
+std::string FaviconSource::GetSource() const {
return icon_types_ == history::FAVICON ?
chrome::kChromeUIFaviconHost : chrome::kChromeUITouchIconHost;
}
diff --git a/chrome/browser/ui/webui/favicon_source.h b/chrome/browser/ui/webui/favicon_source.h
index 28cb9ad..7131d1d7 100644
--- a/chrome/browser/ui/webui/favicon_source.h
+++ b/chrome/browser/ui/webui/favicon_source.h
@@ -69,7 +69,7 @@ class FaviconSource : public content::URLDataSource {
FaviconSource(Profile* profile, IconType type);
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
diff --git a/chrome/browser/ui/webui/fileicon_source.cc b/chrome/browser/ui/webui/fileicon_source.cc
index 65ae146..32479db 100644
--- a/chrome/browser/ui/webui/fileicon_source.cc
+++ b/chrome/browser/ui/webui/fileicon_source.cc
@@ -130,7 +130,7 @@ void FileIconSource::FetchFileIcon(
}
}
-std::string FileIconSource::GetSource() {
+std::string FileIconSource::GetSource() const {
return kFileIconPath;
}
diff --git a/chrome/browser/ui/webui/fileicon_source.h b/chrome/browser/ui/webui/fileicon_source.h
index dc50207..1bb52f2 100644
--- a/chrome/browser/ui/webui/fileicon_source.h
+++ b/chrome/browser/ui/webui/fileicon_source.h
@@ -24,7 +24,7 @@ class FileIconSource : public content::URLDataSource {
explicit FileIconSource();
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index 4ba1c78..52c3cd1 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -309,7 +309,7 @@ NewTabUI::NewTabHTMLSource::NewTabHTMLSource(Profile* profile)
: profile_(profile) {
}
-std::string NewTabUI::NewTabHTMLSource::GetSource() {
+std::string NewTabUI::NewTabHTMLSource::GetSource() const {
return chrome::kChromeUINewTabHost;
}
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.h b/chrome/browser/ui/webui/ntp/new_tab_ui.h
index 859bd64f7..70a45bf 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.h
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.h
@@ -67,7 +67,7 @@ class NewTabUI : public content::WebUIController,
virtual ~NewTabHTMLSource();
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
diff --git a/chrome/browser/ui/webui/ntp/thumbnail_source.cc b/chrome/browser/ui/webui/ntp/thumbnail_source.cc
index 5f3f6f7..1f1829b 100644
--- a/chrome/browser/ui/webui/ntp/thumbnail_source.cc
+++ b/chrome/browser/ui/webui/ntp/thumbnail_source.cc
@@ -30,7 +30,7 @@ ThumbnailSource::ThumbnailSource(Profile* profile)
ThumbnailSource::~ThumbnailSource() {
}
-std::string ThumbnailSource::GetSource() {
+std::string ThumbnailSource::GetSource() const {
return chrome::kChromeUIThumbnailHost;
}
diff --git a/chrome/browser/ui/webui/ntp/thumbnail_source.h b/chrome/browser/ui/webui/ntp/thumbnail_source.h
index 8ceefac..364ce31 100644
--- a/chrome/browser/ui/webui/ntp/thumbnail_source.h
+++ b/chrome/browser/ui/webui/ntp/thumbnail_source.h
@@ -29,7 +29,7 @@ class ThumbnailSource : public content::URLDataSource {
explicit ThumbnailSource(Profile* profile);
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
diff --git a/chrome/browser/ui/webui/options/chromeos/user_image_source.cc b/chrome/browser/ui/webui/options/chromeos/user_image_source.cc
index 2b7caae..581327d 100644
--- a/chrome/browser/ui/webui/options/chromeos/user_image_source.cc
+++ b/chrome/browser/ui/webui/options/chromeos/user_image_source.cc
@@ -81,7 +81,7 @@ UserImageSource::UserImageSource() {
UserImageSource::~UserImageSource() {}
-std::string UserImageSource::GetSource() {
+std::string UserImageSource::GetSource() const {
return chrome::kChromeUIUserImageHost;
}
diff --git a/chrome/browser/ui/webui/options/chromeos/user_image_source.h b/chrome/browser/ui/webui/options/chromeos/user_image_source.h
index adeb601..454ff3f 100644
--- a/chrome/browser/ui/webui/options/chromeos/user_image_source.h
+++ b/chrome/browser/ui/webui/options/chromeos/user_image_source.h
@@ -27,7 +27,7 @@ class UserImageSource : public content::URLDataSource {
UserImageSource();
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
diff --git a/chrome/browser/ui/webui/options/options_ui.cc b/chrome/browser/ui/webui/options/options_ui.cc
index 1f8630d..b13a013 100644
--- a/chrome/browser/ui/webui/options/options_ui.cc
+++ b/chrome/browser/ui/webui/options/options_ui.cc
@@ -111,7 +111,7 @@ class OptionsUIHTMLSource : public content::URLDataSource {
explicit OptionsUIHTMLSource(DictionaryValue* localized_strings);
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
@@ -133,7 +133,7 @@ OptionsUIHTMLSource::OptionsUIHTMLSource(DictionaryValue* localized_strings) {
localized_strings_.reset(localized_strings);
}
-std::string OptionsUIHTMLSource::GetSource() {
+std::string OptionsUIHTMLSource::GetSource() const {
return chrome::kChromeUISettingsFrameHost;
}
diff --git a/chrome/browser/ui/webui/screenshot_source.cc b/chrome/browser/ui/webui/screenshot_source.cc
index 19e8003..6c5a22a 100644
--- a/chrome/browser/ui/webui/screenshot_source.cc
+++ b/chrome/browser/ui/webui/screenshot_source.cc
@@ -139,7 +139,7 @@ bool ScreenshotSource::GetScreenshotDirectory(base::FilePath* directory) {
#endif
-std::string ScreenshotSource::GetSource() {
+std::string ScreenshotSource::GetSource() const {
return chrome::kChromeUIScreenshotPath;
}
diff --git a/chrome/browser/ui/webui/screenshot_source.h b/chrome/browser/ui/webui/screenshot_source.h
index 30d80f4..50bb3dc 100644
--- a/chrome/browser/ui/webui/screenshot_source.h
+++ b/chrome/browser/ui/webui/screenshot_source.h
@@ -50,7 +50,7 @@ class ScreenshotSource : public content::URLDataSource {
static std::string GetScreenshotBaseFilename();
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
diff --git a/chrome/browser/ui/webui/session_favicon_source.cc b/chrome/browser/ui/webui/session_favicon_source.cc
index 7fb57c5..273b2a1 100644
--- a/chrome/browser/ui/webui/session_favicon_source.cc
+++ b/chrome/browser/ui/webui/session_favicon_source.cc
@@ -18,7 +18,7 @@ SessionFaviconSource::SessionFaviconSource(Profile* profile)
SessionFaviconSource::~SessionFaviconSource() {
}
-std::string SessionFaviconSource::GetSource() {
+std::string SessionFaviconSource::GetSource() const {
return chrome::kChromeUISessionFaviconHost;
}
diff --git a/chrome/browser/ui/webui/session_favicon_source.h b/chrome/browser/ui/webui/session_favicon_source.h
index a9cd368..5402c1c5 100644
--- a/chrome/browser/ui/webui/session_favicon_source.h
+++ b/chrome/browser/ui/webui/session_favicon_source.h
@@ -19,7 +19,7 @@ class SessionFaviconSource : public FaviconSource {
explicit SessionFaviconSource(Profile* profile);
// FaviconSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual std::string GetMimeType(const std::string&) const OVERRIDE;
virtual bool ShouldReplaceExistingSource() const OVERRIDE;
virtual bool AllowCaching() const OVERRIDE;
diff --git a/chrome/browser/ui/webui/theme_source.cc b/chrome/browser/ui/webui/theme_source.cc
index 6061c9c..26f76db 100644
--- a/chrome/browser/ui/webui/theme_source.cc
+++ b/chrome/browser/ui/webui/theme_source.cc
@@ -50,7 +50,7 @@ ThemeSource::ThemeSource(Profile* profile)
ThemeSource::~ThemeSource() {
}
-std::string ThemeSource::GetSource() {
+std::string ThemeSource::GetSource() const {
return chrome::kChromeUIThemePath;
}
diff --git a/chrome/browser/ui/webui/theme_source.h b/chrome/browser/ui/webui/theme_source.h
index 0ab44c1..9d5961b 100644
--- a/chrome/browser/ui/webui/theme_source.h
+++ b/chrome/browser/ui/webui/theme_source.h
@@ -24,7 +24,7 @@ class ThemeSource : public content::URLDataSource {
virtual ~ThemeSource();
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
diff --git a/chrome/test/base/web_ui_browsertest.cc b/chrome/test/base/web_ui_browsertest.cc
index 028f821..2762341 100644
--- a/chrome/test/base/web_ui_browsertest.cc
+++ b/chrome/test/base/web_ui_browsertest.cc
@@ -331,7 +331,7 @@ class MockWebUIDataSource : public content::URLDataSource {
private:
virtual ~MockWebUIDataSource() {}
- virtual std::string GetSource() OVERRIDE {
+ virtual std::string GetSource() const OVERRIDE {
return "dummyurl";
}
diff --git a/content/browser/webui/shared_resources_data_source.cc b/content/browser/webui/shared_resources_data_source.cc
index 83f8486..f4a6e41 100644
--- a/content/browser/webui/shared_resources_data_source.cc
+++ b/content/browser/webui/shared_resources_data_source.cc
@@ -34,7 +34,7 @@ SharedResourcesDataSource::SharedResourcesDataSource() {
SharedResourcesDataSource::~SharedResourcesDataSource() {
}
-std::string SharedResourcesDataSource::GetSource() {
+std::string SharedResourcesDataSource::GetSource() const {
return content::kChromeUIResourcesHost;
}
diff --git a/content/browser/webui/shared_resources_data_source.h b/content/browser/webui/shared_resources_data_source.h
index b5c20b7..cce74e3 100644
--- a/content/browser/webui/shared_resources_data_source.h
+++ b/content/browser/webui/shared_resources_data_source.h
@@ -15,7 +15,7 @@ class SharedResourcesDataSource : public content::URLDataSource {
SharedResourcesDataSource();
// content::URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE;
+ virtual std::string GetSource() const OVERRIDE;
virtual void StartDataRequest(
const std::string& path,
bool is_incognito,
diff --git a/content/browser/webui/web_ui_data_source_impl.cc b/content/browser/webui/web_ui_data_source_impl.cc
index 5f17e53..9347e7c 100644
--- a/content/browser/webui/web_ui_data_source_impl.cc
+++ b/content/browser/webui/web_ui_data_source_impl.cc
@@ -35,7 +35,7 @@ class WebUIDataSourceImpl::InternalDataSource : public URLDataSource {
}
// URLDataSource implementation.
- virtual std::string GetSource() OVERRIDE {
+ virtual std::string GetSource() const OVERRIDE {
return parent_->GetSource();
}
virtual std::string GetMimeType(const std::string& path) const OVERRIDE {
@@ -152,7 +152,7 @@ void WebUIDataSourceImpl::DisableDenyXFrameOptions() {
deny_xframe_options_ = false;
}
-std::string WebUIDataSourceImpl::GetSource() {
+std::string WebUIDataSourceImpl::GetSource() const {
return source_name_;
}
diff --git a/content/browser/webui/web_ui_data_source_impl.h b/content/browser/webui/web_ui_data_source_impl.h
index 9553a03..162d336 100644
--- a/content/browser/webui/web_ui_data_source_impl.h
+++ b/content/browser/webui/web_ui_data_source_impl.h
@@ -70,7 +70,7 @@ class CONTENT_EXPORT WebUIDataSourceImpl
// Methods that match URLDataSource which are called by
// InternalDataSource.
- std::string GetSource();
+ std::string GetSource() const;
std::string GetMimeType(const std::string& path) const;
void StartDataRequest(
const std::string& path,
diff --git a/content/public/browser/url_data_source.h b/content/public/browser/url_data_source.h
index 93d38c0..de35090 100644
--- a/content/public/browser/url_data_source.h
+++ b/content/public/browser/url_data_source.h
@@ -37,7 +37,7 @@ class CONTENT_EXPORT URLDataSource {
// The name of this source.
// E.g., for favicons, this could be "favicon", which results in paths for
// specific resources like "favicon/34" getting sent to this source.
- virtual std::string GetSource() = 0;
+ virtual std::string GetSource() const = 0;
// Used by StartDataRequest so that the child class can return the data when
// it's available.