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

Side by Side Diff: content/browser/webui/url_data_manager_backend.cc

Issue 143883018: Fix DartObservatory failure due to security policy settings. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/dart/1700/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698