Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 1741783002: Add disabled origin trial feature list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ef-finch
Patch Set: Separate the introduction of preference-persistence into a different CL Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
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() {
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) {
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698