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

Unified Diff: chrome/browser/ui/webui/about_ui.cc

Issue 277083004: Added browser and OS credits link to EULA page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/about_ui.cc
diff --git a/chrome/browser/ui/webui/about_ui.cc b/chrome/browser/ui/webui/about_ui.cc
index 9c471ecf8837229d0bdaaf28a5eabc14cb728e82..1e760159a00a54867c9eaeb3933f830cf605a177 100644
--- a/chrome/browser/ui/webui/about_ui.cc
+++ b/chrome/browser/ui/webui/about_ui.cc
@@ -91,6 +91,7 @@ using content::WebContents;
namespace {
const char kCreditsJsPath[] = "credits.js";
+const char kKeyboardUtilsPath[] = "keyboard_utils.js";
const char kMemoryJsPath[] = "memory.js";
const char kMemoryCssPath[] = "about_memory.css";
const char kStatsJsPath[] = "stats.js";
@@ -1003,7 +1004,12 @@ void AboutUIHTMLSource::StartDataRequest(
if (source_name_ == chrome::kChromeUIChromeURLsHost) {
response = ChromeURLs();
} else if (source_name_ == chrome::kChromeUICreditsHost) {
- int idr = (path == kCreditsJsPath) ? IDR_CREDITS_JS : IDR_CREDITS_HTML;
+ int idr = IDR_CREDITS_HTML;
+ if (path == kCreditsJsPath)
+ idr = IDR_CREDITS_JS;
+ else if (path == kKeyboardUtilsPath)
+ idr = IDR_KEYBOARD_UTILS_JS;
+
response = ResourceBundle::GetSharedInstance().GetRawDataResource(
idr).as_string();
#if defined(OS_CHROMEOS)
@@ -1024,8 +1030,11 @@ void AboutUIHTMLSource::StartDataRequest(
return;
#if defined(OS_CHROMEOS)
} else if (source_name_ == chrome::kChromeUIOSCreditsHost) {
+ int idr = IDR_OS_CREDITS_HTML;
+ if (path == kKeyboardUtilsPath)
+ idr = IDR_KEYBOARD_UTILS_JS;
response = ResourceBundle::GetSharedInstance().GetRawDataResource(
- IDR_OS_CREDITS_HTML).as_string();
+ idr).as_string();
#endif
#if defined(OS_LINUX) || defined(OS_OPENBSD)
} else if (source_name_ == chrome::kChromeUISandboxHost) {
@@ -1053,9 +1062,10 @@ void AboutUIHTMLSource::FinishDataRequest(
}
std::string AboutUIHTMLSource::GetMimeType(const std::string& path) const {
- if (path == kCreditsJsPath ||
- path == kStatsJsPath ||
- path == kStringsJsPath ||
+ if (path == kCreditsJsPath ||
+ path == kKeyboardUtilsPath ||
+ path == kStatsJsPath ||
+ path == kStringsJsPath ||
path == kMemoryJsPath) {
return "application/javascript";
}
« no previous file with comments | « chrome/browser/resources/login/display_manager.js ('k') | chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698