| OLD | NEW |
| 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" |
| 10 #include "net/url_request/url_request.h" |
| 9 | 11 |
| 10 namespace content { | 12 namespace content { |
| 11 | 13 |
| 12 void URLDataSource::Add(BrowserContext* browser_context, | 14 void URLDataSource::Add(BrowserContext* browser_context, |
| 13 URLDataSource* source) { | 15 URLDataSource* source) { |
| 14 URLDataManager::AddDataSource(browser_context, source); | 16 URLDataManager::AddDataSource(browser_context, source); |
| 15 } | 17 } |
| 16 | 18 |
| 17 MessageLoop* URLDataSource::MessageLoopForRequestPath( | 19 MessageLoop* URLDataSource::MessageLoopForRequestPath( |
| 18 const std::string& path) const { | 20 const std::string& path) const { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 36 } | 38 } |
| 37 | 39 |
| 38 std::string URLDataSource::GetContentSecurityPolicyFrameSrc() const { | 40 std::string URLDataSource::GetContentSecurityPolicyFrameSrc() const { |
| 39 return "frame-src 'none';"; | 41 return "frame-src 'none';"; |
| 40 } | 42 } |
| 41 | 43 |
| 42 bool URLDataSource::ShouldDenyXFrameOptions() const { | 44 bool URLDataSource::ShouldDenyXFrameOptions() const { |
| 43 return true; | 45 return true; |
| 44 } | 46 } |
| 45 | 47 |
| 48 bool URLDataSource::ShouldServiceRequest(const net::URLRequest* request) const { |
| 49 if (request->url().SchemeIs(chrome::kChromeDevToolsScheme) || |
| 50 request->url().SchemeIs(chrome::kChromeUIScheme)) |
| 51 return true; |
| 52 return false; |
| 53 } |
| 54 |
| 46 } // namespace content | 55 } // namespace content |
| OLD | NEW |