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/bind.h" | 10 #include "base/bind.h" |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 | 415 |
416 // chrome-search: resources shouldn't trigger insecure content warnings. Note | 416 // chrome-search: resources shouldn't trigger insecure content warnings. Note |
417 // that the chrome-extension: scheme is registered by extensions::Dispatcher. | 417 // that the chrome-extension: scheme is registered by extensions::Dispatcher. |
418 WebSecurityPolicy::registerURLSchemeAsSecure(chrome_search_scheme); | 418 WebSecurityPolicy::registerURLSchemeAsSecure(chrome_search_scheme); |
419 | 419 |
420 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) | 420 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
421 pdf_print_client_.reset(new ChromePDFPrintClient()); | 421 pdf_print_client_.reset(new ChromePDFPrintClient()); |
422 pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get()); | 422 pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get()); |
423 #endif | 423 #endif |
424 | 424 |
425 std::set<GURL> origins; | 425 for (auto& origin : GetSecureOriginWhitelist()) { |
426 GetSecureOriginWhitelist(&origins); | |
427 for (const GURL& origin : origins) { | |
428 WebSecurityPolicy::addOriginTrustworthyWhiteList( | 426 WebSecurityPolicy::addOriginTrustworthyWhiteList( |
429 WebSecurityOrigin::create(origin)); | 427 WebSecurityOrigin::create(origin)); |
430 } | 428 } |
431 | 429 |
432 std::set<std::string> schemes; | 430 for (auto& scheme : GetSchemesBypassingSecureContextCheckWhitelist()) { |
433 GetSchemesBypassingSecureContextCheckWhitelist(&schemes); | |
434 for (const std::string& scheme : schemes) { | |
435 WebSecurityPolicy::addSchemeToBypassSecureContextWhitelist( | 431 WebSecurityPolicy::addSchemeToBypassSecureContextWhitelist( |
436 WebString::fromUTF8(scheme)); | 432 WebString::fromUTF8(scheme)); |
437 } | 433 } |
438 | 434 |
439 #if defined(OS_CHROMEOS) | 435 #if defined(OS_CHROMEOS) |
440 leak_detector_remote_client_.reset(new LeakDetectorRemoteClient()); | 436 leak_detector_remote_client_.reset(new LeakDetectorRemoteClient()); |
441 thread->AddObserver(leak_detector_remote_client_.get()); | 437 thread->AddObserver(leak_detector_remote_client_.get()); |
442 #endif | 438 #endif |
443 } | 439 } |
444 | 440 |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1481 std::vector<base::SchedulerWorkerPoolParams>* params_vector, | 1477 std::vector<base::SchedulerWorkerPoolParams>* params_vector, |
1482 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* | 1478 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* |
1483 index_to_traits_callback) { | 1479 index_to_traits_callback) { |
1484 DCHECK(params_vector); | 1480 DCHECK(params_vector); |
1485 DCHECK(index_to_traits_callback); | 1481 DCHECK(index_to_traits_callback); |
1486 // If this call fails, content will fall back to the default params. | 1482 // If this call fails, content will fall back to the default params. |
1487 *params_vector = task_scheduler_util::GetRendererWorkerPoolParams(); | 1483 *params_vector = task_scheduler_util::GetRendererWorkerPoolParams(); |
1488 *index_to_traits_callback = | 1484 *index_to_traits_callback = |
1489 base::Bind(&task_scheduler_util::RendererWorkerPoolIndexForTraits); | 1485 base::Bind(&task_scheduler_util::RendererWorkerPoolIndexForTraits); |
1490 } | 1486 } |
OLD | NEW |