| 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" | 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 26 matching lines...) Expand all Loading... |
| 37 // Specific resources require unsafe-eval in the Content Security Policy. | 37 // Specific resources require unsafe-eval in the Content Security Policy. |
| 38 // TODO(tsepez,mfoltz): Remove 'unsafe-eval' when tests have been fixed to | 38 // TODO(tsepez,mfoltz): Remove 'unsafe-eval' when tests have been fixed to |
| 39 // not use eval()/new Function(). http://crbug.com/525224 | 39 // not use eval()/new Function(). http://crbug.com/525224 |
| 40 return "script-src chrome://resources 'self' 'unsafe-eval';"; | 40 return "script-src chrome://resources 'self' 'unsafe-eval';"; |
| 41 } | 41 } |
| 42 | 42 |
| 43 std::string URLDataSource::GetContentSecurityPolicyObjectSrc() const { | 43 std::string URLDataSource::GetContentSecurityPolicyObjectSrc() const { |
| 44 return "object-src 'none';"; | 44 return "object-src 'none';"; |
| 45 } | 45 } |
| 46 | 46 |
| 47 std::string URLDataSource::GetContentSecurityPolicyFrameSrc() const { | 47 std::string URLDataSource::GetContentSecurityPolicyChildSrc() const { |
| 48 return "frame-src 'none';"; | 48 return "child-src 'none';"; |
| 49 } | 49 } |
| 50 | 50 |
| 51 std::string URLDataSource::GetContentSecurityPolicyStyleSrc() const { | 51 std::string URLDataSource::GetContentSecurityPolicyStyleSrc() const { |
| 52 return ""; | 52 return ""; |
| 53 } | 53 } |
| 54 | 54 |
| 55 std::string URLDataSource::GetContentSecurityPolicyImgSrc() const { | 55 std::string URLDataSource::GetContentSecurityPolicyImgSrc() const { |
| 56 return ""; | 56 return ""; |
| 57 } | 57 } |
| 58 | 58 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 70 bool URLDataSource::ShouldServeMimeTypeAsContentTypeHeader() const { | 70 bool URLDataSource::ShouldServeMimeTypeAsContentTypeHeader() const { |
| 71 return false; | 71 return false; |
| 72 } | 72 } |
| 73 | 73 |
| 74 std::string URLDataSource::GetAccessControlAllowOriginForOrigin( | 74 std::string URLDataSource::GetAccessControlAllowOriginForOrigin( |
| 75 const std::string& origin) const { | 75 const std::string& origin) const { |
| 76 return std::string(); | 76 return std::string(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 } // namespace content | 79 } // namespace content |
| OLD | NEW |