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

Unified Diff: chrome/browser/ui/webui/print_preview_data_source.h

Issue 7566049: Add content-security-policy directive to print-preview pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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/print_preview_data_source.h
===================================================================
--- chrome/browser/ui/webui/print_preview_data_source.h (revision 95437)
+++ chrome/browser/ui/webui/print_preview_data_source.h (working copy)
@@ -10,10 +10,11 @@
#include "base/compiler_specific.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
+#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
// PrintPreviewDataSource serves data for chrome://print requests.
//
-// The format for requesting data is as follows:
+// The format for requesting PDF data is as follows:
// chrome://print/<PrintPreviewUIAddrStr>/<PageIndex>/print.pdf
//
// Parameters (< > required):
@@ -24,8 +25,10 @@
//
// Example:
// chrome://print/0xab0123ef/10/print.pdf
-
-class PrintPreviewDataSource : public ChromeURLDataManager::DataSource {
+//
+// Requests to chrome://print with paths not ending in /print.pdf are used
+// to return the markup or other resources for the print preview page itself.
+class PrintPreviewDataSource : public ChromeWebUIDataSource {
public:
PrintPreviewDataSource();
@@ -33,8 +36,6 @@
virtual void StartDataRequest(const std::string& path,
bool is_incognito,
int request_id) OVERRIDE;
- virtual std::string GetMimeType(const std::string& path) const OVERRIDE;
-
private:
virtual ~PrintPreviewDataSource();
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_data_source.cc ('k') | chrome/browser/ui/webui/print_preview_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698