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

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 2679383003: Share schemes needed for CSP between the browser and the renderer. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | content/common/url_schemes.cc » ('j') | content/public/common/content_client.h » ('J')
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 "chrome/common/chrome_content_client.h" 5 #include "chrome/common/chrome_content_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 611
612 #if BUILDFLAG(ENABLE_EXTENSIONS) 612 #if BUILDFLAG(ENABLE_EXTENSIONS)
613 if (extensions::feature_util::ExtensionServiceWorkersEnabled()) 613 if (extensions::feature_util::ExtensionServiceWorkersEnabled())
614 schemes->service_worker_schemes.push_back(extensions::kExtensionScheme); 614 schemes->service_worker_schemes.push_back(extensions::kExtensionScheme);
615 615
616 // As far as Blink is concerned, they should be allowed to receive CORS 616 // As far as Blink is concerned, they should be allowed to receive CORS
617 // requests. At the Extensions layer, requests will actually be blocked unless 617 // requests. At the Extensions layer, requests will actually be blocked unless
618 // overridden by the web_accessible_resources manifest key. 618 // overridden by the web_accessible_resources manifest key.
619 // TODO(kalman): See what happens with a service worker. 619 // TODO(kalman): See what happens with a service worker.
620 schemes->cors_enabled_schemes.push_back(extensions::kExtensionScheme); 620 schemes->cors_enabled_schemes.push_back(extensions::kExtensionScheme);
621
622 schemes->bypassing_csp_schemes.push_back(extensions::kExtensionScheme);
621 #endif 623 #endif
622 624
623 #if defined(OS_CHROMEOS) 625 #if defined(OS_CHROMEOS)
624 schemes->local_schemes.push_back(content::kExternalFileScheme); 626 schemes->local_schemes.push_back(content::kExternalFileScheme);
625 #endif 627 #endif
626 628
627 #if defined(OS_ANDROID) 629 #if defined(OS_ANDROID)
628 schemes->local_schemes.push_back(url::kContentScheme); 630 schemes->local_schemes.push_back(url::kContentScheme);
629 #endif 631 #endif
630 } 632 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 if (!origin_trial_policy_) 709 if (!origin_trial_policy_)
708 origin_trial_policy_ = base::MakeUnique<ChromeOriginTrialPolicy>(); 710 origin_trial_policy_ = base::MakeUnique<ChromeOriginTrialPolicy>();
709 return origin_trial_policy_.get(); 711 return origin_trial_policy_.get();
710 } 712 }
711 713
712 #if defined(OS_ANDROID) 714 #if defined(OS_ANDROID)
713 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { 715 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() {
714 return new ChromeMediaClientAndroid(); 716 return new ChromeMediaClientAndroid();
715 } 717 }
716 #endif // OS_ANDROID 718 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « no previous file | content/common/url_schemes.cc » ('j') | content/public/common/content_client.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698