| 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() { | 701 base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() const { |
| 702 return origin_trial_key_manager_.GetPublicKey(); | 702 return origin_trial_key_manager_.GetPublicKey(); |
| 703 } | 703 } |
| 704 | 704 |
| 705 bool ChromeContentClient::IsOriginTrialFeatureDisabled( |
| 706 base::StringPiece feature) const { |
| 707 return origin_trial_key_manager_.IsFeatureDisabled(feature); |
| 708 } |
| 709 |
| 705 void ChromeContentClient::InitializeOriginTrialPolicy() { | 710 void ChromeContentClient::InitializeOriginTrialPolicy() { |
| 706 // Set the public key for the origin trial key manager, based on the command | 711 // Set the public key and disabled feature list for the origin trial key |
| 707 // line flags which were passed to this process. | 712 // manager, based on the command line flags which were passed to this process. |
| 708 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 713 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 709 if (command_line->HasSwitch(switches::kOriginTrialPublicKey)) { | 714 if (command_line->HasSwitch(switches::kOriginTrialPublicKey)) { |
| 710 origin_trial_key_manager()->SetPublicKeyFromASCIIString( | 715 origin_trial_key_manager()->SetPublicKeyFromASCIIString( |
| 711 command_line->GetSwitchValueASCII(switches::kOriginTrialPublicKey)); | 716 command_line->GetSwitchValueASCII(switches::kOriginTrialPublicKey)); |
| 712 } | 717 } |
| 718 if (command_line->HasSwitch(switches::kOriginTrialDisabledFeatures)) { |
| 719 origin_trial_key_manager()->SetDisabledFeatures( |
| 720 command_line->GetSwitchValueASCII( |
| 721 switches::kOriginTrialDisabledFeatures)); |
| 722 } |
| 713 } | 723 } |
| 714 | 724 |
| 715 #if defined(OS_ANDROID) | 725 #if defined(OS_ANDROID) |
| 716 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { | 726 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { |
| 717 return new ChromeMediaClientAndroid(); | 727 return new ChromeMediaClientAndroid(); |
| 718 } | 728 } |
| 719 #endif // OS_ANDROID | 729 #endif // OS_ANDROID |
| OLD | NEW |