summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_about_handler.cc
diff options
context:
space:
mode:
authornkostylev@google.com <nkostylev@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-12 16:41:11 +0000
committernkostylev@google.com <nkostylev@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-12 16:41:11 +0000
commit6c8dd0810510d2d9fafdb96b0549db98c4f34944 (patch)
tree5c1df037c0e4f681a6c1c2f5229fd6d9b563e7d6 /chrome/browser/browser_about_handler.cc
parentcfcafd9f24e4b75e4cfd6eadfa6a4620943e8b78 (diff)
downloadchromium_src-6c8dd0810510d2d9fafdb96b0549db98c4f34944.zip
chromium_src-6c8dd0810510d2d9fafdb96b0549db98c4f34944.tar.gz
chromium_src-6c8dd0810510d2d9fafdb96b0549db98c4f34944.tar.bz2
[cros] Fix serving of chrome:// resources in OOBE WebUI.
Explicitly register theme and terms data sources before navigating to chrome://oobe. BUG=chromium-os:17329 TEST=Manual. Loaded OOBE, EULA screen has content in iframe. Review URL: http://codereview.chromium.org/7349006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92179 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_about_handler.cc')
-rw-r--r--chrome/browser/browser_about_handler.cc22
1 files changed, 10 insertions, 12 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index a6e06bb..988b0d8 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -215,18 +215,6 @@ class AboutSource : public ChromeURLDataManager::DataSource {
DISALLOW_COPY_AND_ASSIGN(AboutSource);
};
-// Register a data source for a known source name. Safe to call multiple times.
-// |name| may be an unkown host (e.g. "chrome://foo/"); only handle known hosts.
-void InitializeAboutDataSource(const std::string& name, Profile* profile) {
- ChromeURLDataManager* manager = profile->GetChromeURLDataManager();
- for (size_t i = 0; i < arraysize(kAboutSourceNames); i++) {
- if (name == kAboutSourceNames[i]) {
- manager->AddDataSource(new AboutSource(name, profile));
- return;
- }
- }
-}
-
// When you type about:memory, it actually loads this intermediate URL that
// redirects you to the final page. This avoids the problem where typing
// "about:memory" on the new tab page or any other page where a process
@@ -1401,6 +1389,16 @@ std::string AboutSource::GetMimeType(const std::string& path) const {
// -----------------------------------------------------------------------------
+void InitializeAboutDataSource(const std::string& name, Profile* profile) {
+ ChromeURLDataManager* manager = profile->GetChromeURLDataManager();
+ for (size_t i = 0; i < arraysize(kAboutSourceNames); i++) {
+ if (name == kAboutSourceNames[i]) {
+ manager->AddDataSource(new AboutSource(name, profile));
+ return;
+ }
+ }
+}
+
bool WillHandleBrowserAboutURL(GURL* url, Profile* profile) {
// TODO(msw): Eliminate "about:*" constants and literals from code and tests,
// then hopefully we can remove this forced fixup.