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 "chrome/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 pdf_print_client_.reset(new ChromePDFPrintClient()); | 509 pdf_print_client_.reset(new ChromePDFPrintClient()); |
510 pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get()); | 510 pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get()); |
511 #endif | 511 #endif |
512 | 512 |
513 std::set<GURL> origins; | 513 std::set<GURL> origins; |
514 GetSecureOriginWhitelist(&origins); | 514 GetSecureOriginWhitelist(&origins); |
515 for (const GURL& origin : origins) { | 515 for (const GURL& origin : origins) { |
516 WebSecurityPolicy::addOriginTrustworthyWhiteList( | 516 WebSecurityPolicy::addOriginTrustworthyWhiteList( |
517 WebSecurityOrigin::create(origin)); | 517 WebSecurityOrigin::create(origin)); |
518 } | 518 } |
| 519 |
| 520 std::set<std::string> schemes; |
| 521 GetSchemesBypassingSecureContextCheckWhitelist(&schemes); |
| 522 for (const std::string& scheme : schemes) { |
| 523 WebSecurityPolicy::addSchemeToBypassSecureContextWhitelist( |
| 524 WebString::fromUTF8(scheme)); |
| 525 } |
519 } | 526 } |
520 | 527 |
521 void ChromeContentRendererClient::RenderFrameCreated( | 528 void ChromeContentRendererClient::RenderFrameCreated( |
522 content::RenderFrame* render_frame) { | 529 content::RenderFrame* render_frame) { |
523 new ChromeRenderFrameObserver(render_frame); | 530 new ChromeRenderFrameObserver(render_frame); |
524 | 531 |
525 bool should_whitelist_for_content_settings = | 532 bool should_whitelist_for_content_settings = |
526 base::CommandLine::ForCurrentProcess()->HasSwitch( | 533 base::CommandLine::ForCurrentProcess()->HasSwitch( |
527 switches::kInstantProcess); | 534 switches::kInstantProcess); |
528 extensions::Dispatcher* ext_dispatcher = NULL; | 535 extensions::Dispatcher* ext_dispatcher = NULL; |
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1675 // chrome.system.network.getNetworkInterfaces provides the same | 1682 // chrome.system.network.getNetworkInterfaces provides the same |
1676 // information. Also, the enforcement of sending and binding UDP is already done | 1683 // information. Also, the enforcement of sending and binding UDP is already done |
1677 // by chrome extension permission model. | 1684 // by chrome extension permission model. |
1678 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { | 1685 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { |
1679 #if defined(ENABLE_EXTENSIONS) | 1686 #if defined(ENABLE_EXTENSIONS) |
1680 return !IsStandaloneExtensionProcess(); | 1687 return !IsStandaloneExtensionProcess(); |
1681 #else | 1688 #else |
1682 return true; | 1689 return true; |
1683 #endif | 1690 #endif |
1684 } | 1691 } |
OLD | NEW |