| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 | 413 |
| 414 // chrome-search: resources shouldn't trigger insecure content warnings. Note | 414 // chrome-search: resources shouldn't trigger insecure content warnings. Note |
| 415 // that the chrome-extension: scheme is registered by extensions::Dispatcher. | 415 // that the chrome-extension: scheme is registered by extensions::Dispatcher. |
| 416 WebSecurityPolicy::registerURLSchemeAsSecure(chrome_search_scheme); | 416 WebSecurityPolicy::registerURLSchemeAsSecure(chrome_search_scheme); |
| 417 | 417 |
| 418 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) | 418 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
| 419 pdf_print_client_.reset(new ChromePDFPrintClient()); | 419 pdf_print_client_.reset(new ChromePDFPrintClient()); |
| 420 pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get()); | 420 pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get()); |
| 421 #endif | 421 #endif |
| 422 | 422 |
| 423 std::set<GURL> origins; | 423 std::vector<std::string> origins; |
| 424 GetSecureOriginWhitelist(&origins); | 424 GetSecureOriginWhitelist(&origins); |
| 425 for (const GURL& origin : origins) { | 425 for (const std::string& origin : origins) { |
| 426 WebSecurityPolicy::addOriginTrustworthyWhiteList( | 426 WebSecurityPolicy::addOriginTrustworthyWhiteList( |
| 427 WebSecurityOrigin::create(origin)); | 427 WebSecurityOrigin::create(GURL(origin))); |
| 428 } | 428 } |
| 429 | 429 |
| 430 std::set<std::string> schemes; | 430 std::set<std::string> schemes; |
| 431 GetSchemesBypassingSecureContextCheckWhitelist(&schemes); | 431 GetSchemesBypassingSecureContextCheckWhitelist(&schemes); |
| 432 for (const std::string& scheme : schemes) { | 432 for (const std::string& scheme : schemes) { |
| 433 WebSecurityPolicy::addSchemeToBypassSecureContextWhitelist( | 433 WebSecurityPolicy::addSchemeToBypassSecureContextWhitelist( |
| 434 WebString::fromUTF8(scheme)); | 434 WebString::fromUTF8(scheme)); |
| 435 } | 435 } |
| 436 | 436 |
| 437 #if defined(OS_CHROMEOS) | 437 #if defined(OS_CHROMEOS) |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1467 | 1467 |
| 1468 url::Replacements<char> r; | 1468 url::Replacements<char> r; |
| 1469 r.SetPath(path.c_str(), url::Component(0, path.length())); | 1469 r.SetPath(path.c_str(), url::Component(0, path.length())); |
| 1470 | 1470 |
| 1471 if (result == internal::NUM_PLUGIN_ERROR) | 1471 if (result == internal::NUM_PLUGIN_ERROR) |
| 1472 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS; | 1472 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS; |
| 1473 | 1473 |
| 1474 RecordYouTubeRewriteUMA(result); | 1474 RecordYouTubeRewriteUMA(result); |
| 1475 return corrected_url.ReplaceComponents(r); | 1475 return corrected_url.ReplaceComponents(r); |
| 1476 } | 1476 } |
| OLD | NEW |