Chromium Code Reviews| 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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 494 WebSecurityPolicy::registerURLSchemeAsCORSEnabled(extension_scheme); | 494 WebSecurityPolicy::registerURLSchemeAsCORSEnabled(extension_scheme); |
| 495 WebSecurityPolicy::registerURLSchemeAsCORSEnabled(extension_resource_scheme); | 495 WebSecurityPolicy::registerURLSchemeAsCORSEnabled(extension_resource_scheme); |
| 496 | 496 |
| 497 // chrome-extension: resources should bypass Content Security Policy checks | 497 // chrome-extension: resources should bypass Content Security Policy checks |
| 498 // when included in protected resources. | 498 // when included in protected resources. |
| 499 WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy( | 499 WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy( |
| 500 extension_scheme); | 500 extension_scheme); |
| 501 WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy( | 501 WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy( |
| 502 extension_resource_scheme); | 502 extension_resource_scheme); |
| 503 | 503 |
| 504 // chrome-extension: resources should be allowed to register a Service Worker. | |
| 505 WebSecurityPolicy::registerURLSchemeAsAllowingServiceWorkers( | |
|
Devlin
2015/06/30 22:01:15
We can actually move this into the constructor of
| |
| 506 extension_scheme); | |
| 507 | |
| 504 #if defined(OS_WIN) | 508 #if defined(OS_WIN) |
| 505 // Report if the renderer process has been patched by chrome_elf. | 509 // Report if the renderer process has been patched by chrome_elf. |
| 506 // TODO(csharp): Remove once the renderer is no longer getting | 510 // TODO(csharp): Remove once the renderer is no longer getting |
| 507 // patched this way. | 511 // patched this way. |
| 508 if (blacklist::IsBlacklistInitialized()) | 512 if (blacklist::IsBlacklistInitialized()) |
| 509 UMA_HISTOGRAM_BOOLEAN("Blacklist.PatchedInRenderer", true); | 513 UMA_HISTOGRAM_BOOLEAN("Blacklist.PatchedInRenderer", true); |
| 510 #endif | 514 #endif |
| 511 #if defined(ENABLE_PRINT_PREVIEW) | 515 #if defined(ENABLE_PRINT_PREVIEW) |
| 512 pdf_print_client_.reset(new ChromePDFPrintClient()); | 516 pdf_print_client_.reset(new ChromePDFPrintClient()); |
| 513 pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get()); | 517 pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get()); |
| (...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1620 WebString header_key(ASCIIToUTF16( | 1624 WebString header_key(ASCIIToUTF16( |
| 1621 data_reduction_proxy::chrome_proxy_header())); | 1625 data_reduction_proxy::chrome_proxy_header())); |
| 1622 if (!response.httpHeaderField(header_key).isNull() && | 1626 if (!response.httpHeaderField(header_key).isNull() && |
| 1623 response.httpHeaderField(header_key).utf8().find( | 1627 response.httpHeaderField(header_key).utf8().find( |
| 1624 data_reduction_proxy::chrome_proxy_lo_fi_directive()) != | 1628 data_reduction_proxy::chrome_proxy_lo_fi_directive()) != |
| 1625 std::string::npos) { | 1629 std::string::npos) { |
| 1626 (*properties)[data_reduction_proxy::chrome_proxy_header()] = | 1630 (*properties)[data_reduction_proxy::chrome_proxy_header()] = |
| 1627 data_reduction_proxy::chrome_proxy_lo_fi_directive(); | 1631 data_reduction_proxy::chrome_proxy_lo_fi_directive(); |
| 1628 } | 1632 } |
| 1629 } | 1633 } |
| OLD | NEW |