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

Side by Side Diff: content/public/browser/url_data_source.cc

Issue 105723002: Add the scheme chrome-distiller:// and hook up data source. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implement as data source instead. Also rebased across thousands of CLs. Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/browser/url_data_source.h" 5 #include "content/public/browser/url_data_source.h"
6 6
7 #include "content/browser/webui/url_data_manager.h" 7 #include "content/browser/webui/url_data_manager.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "content/public/common/url_constants.h" 9 #include "content/public/common/url_constants.h"
10 #include "net/url_request/url_request.h" 10 #include "net/url_request/url_request.h"
(...skipping 29 matching lines...) Expand all
40 std::string URLDataSource::GetContentSecurityPolicyFrameSrc() const { 40 std::string URLDataSource::GetContentSecurityPolicyFrameSrc() const {
41 return "frame-src 'none';"; 41 return "frame-src 'none';";
42 } 42 }
43 43
44 bool URLDataSource::ShouldDenyXFrameOptions() const { 44 bool URLDataSource::ShouldDenyXFrameOptions() const {
45 return true; 45 return true;
46 } 46 }
47 47
48 bool URLDataSource::ShouldServiceRequest(const net::URLRequest* request) const { 48 bool URLDataSource::ShouldServiceRequest(const net::URLRequest* request) const {
49 if (request->url().SchemeIs(chrome::kChromeDevToolsScheme) || 49 if (request->url().SchemeIs(chrome::kChromeDevToolsScheme) ||
50 request->url().SchemeIs(chrome::kDomDistillerScheme) ||
nasko 2014/01/16 23:39:12 nit: alphabetical order
nyquist 2014/01/22 00:47:58 We override this in the data source, so removed th
50 request->url().SchemeIs(chrome::kChromeUIScheme)) 51 request->url().SchemeIs(chrome::kChromeUIScheme))
51 return true; 52 return true;
52 return false; 53 return false;
53 } 54 }
54 55
55 bool URLDataSource::ShouldServeMimeTypeAsContentTypeHeader() const { 56 bool URLDataSource::ShouldServeMimeTypeAsContentTypeHeader() const {
56 return false; 57 return false;
57 } 58 }
58 59
59 } // namespace content 60 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698