diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-24 06:36:19 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-24 06:36:19 +0000 |
commit | cd8c905857cb134f7c884389dd5652731b30d51e (patch) | |
tree | 7d270fe59a56df7254ed38eea7feacfc2b2f35cf /chrome/browser/browser_about_handler.cc | |
parent | 7ad0dea94b930fdfaf3fb3de212c7321267156c8 (diff) | |
download | chromium_src-cd8c905857cb134f7c884389dd5652731b30d51e.zip chromium_src-cd8c905857cb134f7c884389dd5652731b30d51e.tar.gz chromium_src-cd8c905857cb134f7c884389dd5652731b30d51e.tar.bz2 |
Replace about:plugins page with new page.
Do this by "remapping" about:plugins to chrome://plugins/. Also delete old
about:plugins page and associated strings.
BUG=736
TEST=Go to about:plugins; should get new plugins page (same as chrome://plugins/).
Review URL: http://codereview.chromium.org/1219005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42434 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_about_handler.cc')
-rw-r--r-- | chrome/browser/browser_about_handler.cc | 45 |
1 files changed, 7 insertions, 38 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index a4126d1..91be7c2 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -85,7 +85,6 @@ const char kDnsPath[] = "dns"; const char kHistogramsPath[] = "histograms"; const char kMemoryRedirectPath[] = "memory-redirect"; const char kMemoryPath[] = "memory"; -const char kPluginsPath[] = "plugins"; const char kStatsPath[] = "stats"; const char kSyncPath[] = "sync"; const char kTasksPath[] = "tasks"; @@ -335,40 +334,6 @@ static std::string AboutObjects(const std::string& query) { } #endif // TRACK_ALL_TASK_OBJECTS -std::string AboutPlugins() { - // Strings used in the JsTemplate file. - DictionaryValue localized_strings; - localized_strings.SetString(L"title", - l10n_util::GetString(IDS_ABOUT_PLUGINS_TITLE)); - localized_strings.SetString(L"headingPlugs", - l10n_util::GetString(IDS_ABOUT_PLUGINS_HEADING_PLUGS)); - localized_strings.SetString(L"headingNoPlugs", - l10n_util::GetString(IDS_ABOUT_PLUGINS_HEADING_NOPLUGS)); - localized_strings.SetString(L"filename", - l10n_util::GetString(IDS_ABOUT_PLUGINS_FILENAME_LABEL)); - localized_strings.SetString(L"mimetype", - l10n_util::GetString(IDS_ABOUT_PLUGINS_MIMETYPE_LABEL)); - localized_strings.SetString(L"description", - l10n_util::GetString(IDS_ABOUT_PLUGINS_DESCRIPTION_LABEL)); - localized_strings.SetString(L"suffixes", - l10n_util::GetString(IDS_ABOUT_PLUGINS_SUFFIX_LABEL)); - localized_strings.SetString(L"enabled", - l10n_util::GetString(IDS_ABOUT_PLUGINS_ENABLED_LABEL)); - localized_strings.SetString(L"enabled_yes", - l10n_util::GetString(IDS_ABOUT_PLUGINS_ENABLED_YES)); - localized_strings.SetString(L"enabled_no", - l10n_util::GetString(IDS_ABOUT_PLUGINS_ENABLED_NO)); - - ChromeURLDataManager::DataSource::SetFontAndTextDirection(&localized_strings); - - static const base::StringPiece plugins_html( - ResourceBundle::GetSharedInstance().GetRawDataResource( - IDR_ABOUT_PLUGINS_HTML)); - - return jstemplate_builder::GetTemplatesHtml( - plugins_html, &localized_strings, "t" /* template root node id */); -} - std::string AboutStats() { // We keep the DictionaryValue tree live so that we can do delta // stats computations across runs. @@ -694,8 +659,6 @@ void AboutSource::StartDataRequest(const std::string& path_raw, } else if (path == kTasksPath) { response = AboutObjects(info); #endif - } else if (path == kPluginsPath) { - response = AboutPlugins(); } else if (path == kStatsPath) { response = AboutStats(); #if defined(USE_TCMALLOC) @@ -932,6 +895,12 @@ bool WillHandleBrowserAboutURL(GURL* url, Profile* profile) { return true; } + // Rewrite about:plugins to chrome://plugins/. + if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutPluginsURL)) { + *url = GURL(chrome::kChromeUIPluginsURL); + return true; + } + // Handle URL to crash the browser process. if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutBrowserCrash)) { // Induce an intentional crash in the browser process. |