| 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/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 <memory> | 9 #include <memory> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 } | 691 } |
| 692 | 692 |
| 693 bool ChromeContentClient::IsSupplementarySiteIsolationModeEnabled() { | 693 bool ChromeContentClient::IsSupplementarySiteIsolationModeEnabled() { |
| 694 #if defined(ENABLE_EXTENSIONS) | 694 #if defined(ENABLE_EXTENSIONS) |
| 695 return extensions::IsIsolateExtensionsEnabled(); | 695 return extensions::IsIsolateExtensionsEnabled(); |
| 696 #else | 696 #else |
| 697 return false; | 697 return false; |
| 698 #endif | 698 #endif |
| 699 } | 699 } |
| 700 | 700 |
| 701 base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() const { | |
| 702 return origin_trial_key_manager_.GetPublicKey(); | |
| 703 } | |
| 704 | |
| 705 bool ChromeContentClient::IsOriginTrialFeatureDisabled( | |
| 706 base::StringPiece feature) const { | |
| 707 return origin_trial_key_manager_.IsFeatureDisabled(feature); | |
| 708 } | |
| 709 | |
| 710 void ChromeContentClient::InitializeOriginTrialPolicy() { | 701 void ChromeContentClient::InitializeOriginTrialPolicy() { |
| 711 // Set the public key and disabled feature list for the origin trial key | 702 // Set the public key and disabled feature list for the origin trial key |
| 712 // manager, based on the command line flags which were passed to this process. | 703 // manager, based on the command line flags which were passed to this process. |
| 713 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 704 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 714 if (command_line->HasSwitch(switches::kOriginTrialPublicKey)) { | 705 if (command_line->HasSwitch(switches::kOriginTrialPublicKey)) { |
| 715 origin_trial_key_manager()->SetPublicKeyFromASCIIString( | 706 origin_trial_policy_.SetPublicKeyFromASCIIString( |
| 716 command_line->GetSwitchValueASCII(switches::kOriginTrialPublicKey)); | 707 command_line->GetSwitchValueASCII(switches::kOriginTrialPublicKey)); |
| 717 } | 708 } |
| 718 if (command_line->HasSwitch(switches::kOriginTrialDisabledFeatures)) { | 709 if (command_line->HasSwitch(switches::kOriginTrialDisabledFeatures)) { |
| 719 origin_trial_key_manager()->SetDisabledFeatures( | 710 origin_trial_policy_.SetDisabledFeatures(command_line->GetSwitchValueASCII( |
| 720 command_line->GetSwitchValueASCII( | 711 switches::kOriginTrialDisabledFeatures)); |
| 721 switches::kOriginTrialDisabledFeatures)); | |
| 722 } | 712 } |
| 723 } | 713 } |
| 724 | 714 |
| 715 const content::OriginTrialPolicy* ChromeContentClient::GetOriginTrialPolicy() |
| 716 const { |
| 717 return &origin_trial_policy_; |
| 718 } |
| 719 |
| 725 #if defined(OS_ANDROID) | 720 #if defined(OS_ANDROID) |
| 726 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { | 721 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { |
| 727 return new ChromeMediaClientAndroid(); | 722 return new ChromeMediaClientAndroid(); |
| 728 } | 723 } |
| 729 #endif // OS_ANDROID | 724 #endif // OS_ANDROID |
| OLD | NEW |