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

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

Issue 2047683002: Store Origin Trials public key in browser prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 void ChromeContentClient::InitializeOriginTrialPolicy() {
706 // Set the public key for the origin trial key manager, based on the command
707 // line flags which were passed to this process.
708 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
709 if (command_line->HasSwitch(switches::kOriginTrialPublicKey)) {
710 origin_trial_key_manager()->SetPublicKeyFromASCIIString(
711 command_line->GetSwitchValueASCII(switches::kOriginTrialPublicKey));
712 }
713 }
714
705 #if defined(OS_ANDROID) 715 #if defined(OS_ANDROID)
706 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { 716 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() {
707 return new ChromeMediaClientAndroid(); 717 return new ChromeMediaClientAndroid();
708 } 718 }
709 #endif // OS_ANDROID 719 #endif // OS_ANDROID
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698