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

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

Issue 2049783002: Refactor OriginTrialPolicy to be an abstract interface in content/public/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ef-add-revoked-feature-list
Patch Set: Fix comment 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 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 } 693 }
694 694
695 bool ChromeContentClient::IsSupplementarySiteIsolationModeEnabled() { 695 bool ChromeContentClient::IsSupplementarySiteIsolationModeEnabled() {
696 #if defined(ENABLE_EXTENSIONS) 696 #if defined(ENABLE_EXTENSIONS)
697 return extensions::IsIsolateExtensionsEnabled(); 697 return extensions::IsIsolateExtensionsEnabled();
698 #else 698 #else
699 return false; 699 return false;
700 #endif 700 #endif
701 } 701 }
702 702
703 base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() { 703 void ChromeContentClient::InitializeOriginTrialPolicy() {
704 return origin_trial_key_manager_.GetPublicKey(); 704 // Set the public key for the origin trial key manager, based on the command
705 // line flags which were passed to this process.
706 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
707 if (command_line->HasSwitch(switches::kOriginTrialPublicKey)) {
708 origin_trial_policy_.SetPublicKeyFromASCIIString(
709 command_line->GetSwitchValueASCII(switches::kOriginTrialPublicKey));
710 }
711 }
712
713 const content::OriginTrialPolicy* ChromeContentClient::GetOriginTrialPolicy()
714 const {
715 return &origin_trial_policy_;
705 } 716 }
706 717
707 #if defined(OS_ANDROID) 718 #if defined(OS_ANDROID)
708 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { 719 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() {
709 return new ChromeMediaClientAndroid(); 720 return new ChromeMediaClientAndroid();
710 } 721 }
711 #endif // OS_ANDROID 722 #endif // OS_ANDROID
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698