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

Unified Diff: chrome/browser/dom_ui/new_tab_ui.h

Issue 10941: Add mimetypes on the "chrome-resource://" responses.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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/dom_ui/chrome_url_data_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/new_tab_ui.h
===================================================================
--- chrome/browser/dom_ui/new_tab_ui.h (revision 5286)
+++ chrome/browser/dom_ui/new_tab_ui.h (working copy)
@@ -36,6 +36,10 @@
// the path we registered.
virtual void StartDataRequest(const std::string& path, int request_id);
+ virtual std::string GetMimeType(const std::string&) const {
+ return "text/html";
+ }
+
// Setters and getters for first_view.
static void set_first_view(bool first_view) { first_view_ = first_view; }
static bool first_view() { return first_view_; }
@@ -57,6 +61,10 @@
// the path we registered.
virtual void StartDataRequest(const std::string& path, int request_id);
+ virtual std::string GetMimeType(const std::string&) const {
+ return "text/html";
+ }
+
private:
DISALLOW_EVIL_CONSTRUCTORS(IncognitoTabHTMLSource);
};
@@ -71,6 +79,11 @@
// the path we registered.
virtual void StartDataRequest(const std::string& path, int request_id);
+ virtual std::string GetMimeType(const std::string&) const {
+ // Rely on image decoder inferring the correct type.
+ return std::string();
+ }
+
// Called when thumbnail data is available from the history backend.
void OnThumbnailDataAvailable(
HistoryService::Handle request_handle,
@@ -97,6 +110,11 @@
// the path we registered.
virtual void StartDataRequest(const std::string& path, int request_id);
+ virtual std::string GetMimeType(const std::string&) const {
+ // Rely on image decoder inferring the correct type.
+ return std::string();
+ }
+
// Called when favicon data is available from the history backend.
void OnFavIconDataAvailable(
HistoryService::Handle request_handle,
« no previous file with comments | « chrome/browser/dom_ui/chrome_url_data_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698