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

Unified Diff: chrome/browser/browser_about_handler.cc

Issue 6804: Add about:terms to Chrome, and about:licence to Chromium and Chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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
« no previous file with comments | « chrome/browser/browser_about_handler.h ('k') | chrome/browser/browser_resources.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_about_handler.cc
===================================================================
--- chrome/browser/browser_about_handler.cc (revision 3215)
+++ chrome/browser/browser_about_handler.cc (working copy)
@@ -15,6 +15,7 @@
#include "base/string_piece.h"
#include "base/string_util.h"
#include "base/tracked_objects.h"
+#include "chrome/app/locales/locale_settings.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_process.h"
@@ -56,6 +57,8 @@
static const char kPluginsPath[] = "plugins";
static const char kStatsPath[] = "stats";
static const char kVersionPath[] = "version";
+static const char kCreditsPath[] = "credits";
+static const char kTermsPath[] = "terms";
class AboutSource : public ChromeURLDataManager::DataSource {
public:
@@ -128,6 +131,10 @@
response = BrowserAboutHandler::AboutStats();
} else if (path == kVersionPath || path.empty()) {
response = BrowserAboutHandler::AboutVersion();
+ } else if (path == kCreditsPath) {
+ response = BrowserAboutHandler::AboutCredits();
+ } else if (path == kTermsPath) {
+ response = BrowserAboutHandler::AboutTerms();
}
FinishDataRequest(response, request_id);
}
@@ -274,6 +281,24 @@
}
// static
+std::string BrowserAboutHandler::AboutCredits() {
+ static const std::string credits_html =
+ ResourceBundle::GetSharedInstance().GetDataResource(
+ IDR_CREDITS_HTML);
+
+ return credits_html;
+}
+
+// static
+std::string BrowserAboutHandler::AboutTerms() {
+ static const std::string terms_html =
+ ResourceBundle::GetSharedInstance().GetDataResource(
+ IDR_TERMS_HTML);
+
+ return terms_html;
+}
+
+// static
std::string BrowserAboutHandler::AboutPlugins() {
// Strings used in the JsTemplate file.
DictionaryValue localized_strings;
« no previous file with comments | « chrome/browser/browser_about_handler.h ('k') | chrome/browser/browser_resources.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698