OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/webui/url_data_manager_backend.h" | 5 #include "content/browser/webui/url_data_manager_backend.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "net/url_request/url_request_job_factory.h" | 40 #include "net/url_request/url_request_job_factory.h" |
41 #include "url/url_util.h" | 41 #include "url/url_util.h" |
42 #include "webkit/browser/appcache/view_appcache_internals_job.h" | 42 #include "webkit/browser/appcache/view_appcache_internals_job.h" |
43 | 43 |
44 using appcache::AppCacheService; | 44 using appcache::AppCacheService; |
45 | 45 |
46 namespace content { | 46 namespace content { |
47 | 47 |
48 namespace { | 48 namespace { |
49 | 49 |
| 50 // TODO(jacobr) remove https://www.google.com when the dependency on the |
| 51 // Google Charts API is removed from the Dart Observatory. |
50 // TODO(tsepez) remove unsafe-eval when bidichecker_packaged.js fixed. | 52 // TODO(tsepez) remove unsafe-eval when bidichecker_packaged.js fixed. |
51 const char kChromeURLContentSecurityPolicyHeaderBase[] = | 53 const char kChromeURLContentSecurityPolicyHeaderBase[] = |
52 "Content-Security-Policy: script-src chrome://resources " | 54 "Content-Security-Policy: script-src chrome://resources " |
53 "'self' 'unsafe-eval'; "; | 55 "'self' https://www.google.com 'unsafe-eval'; "; |
54 | 56 |
55 const char kChromeURLXFrameOptionsHeader[] = "X-Frame-Options: DENY"; | 57 const char kChromeURLXFrameOptionsHeader[] = "X-Frame-Options: DENY"; |
56 | 58 |
57 bool SchemeIsInSchemes(const std::string& scheme, | 59 bool SchemeIsInSchemes(const std::string& scheme, |
58 const std::vector<std::string>& schemes) { | 60 const std::vector<std::string>& schemes) { |
59 return std::find(schemes.begin(), schemes.end(), scheme) != schemes.end(); | 61 return std::find(schemes.begin(), schemes.end(), scheme) != schemes.end(); |
60 } | 62 } |
61 | 63 |
62 // Parse a URL into the components used to resolve its request. |source_name| | 64 // Parse a URL into the components used to resolve its request. |source_name| |
63 // is the hostname and |path| is the remaining portion of the URL. | 65 // is the hostname and |path| is the remaining portion of the URL. |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 | 648 |
647 } // namespace | 649 } // namespace |
648 | 650 |
649 net::URLRequestJobFactory::ProtocolHandler* | 651 net::URLRequestJobFactory::ProtocolHandler* |
650 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context, | 652 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context, |
651 bool is_incognito) { | 653 bool is_incognito) { |
652 return new DevToolsJobFactory(resource_context, is_incognito); | 654 return new DevToolsJobFactory(resource_context, is_incognito); |
653 } | 655 } |
654 | 656 |
655 } // namespace content | 657 } // namespace content |
OLD | NEW |