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

Unified Diff: chrome/renderer/origin_trials/origin_trial_key_manager.cc

Issue 1653263005: [Experimental Framework] Move the trial token public key out of content and into the embedder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, and update for recent token changes Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/origin_trials/origin_trial_key_manager.h ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/origin_trials/origin_trial_key_manager.cc
diff --git a/chrome/renderer/origin_trials/origin_trial_key_manager.cc b/chrome/renderer/origin_trials/origin_trial_key_manager.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e074f40af6a0e872d56f0867998f1cdc5d932d91
--- /dev/null
+++ b/chrome/renderer/origin_trials/origin_trial_key_manager.cc
@@ -0,0 +1,23 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/renderer/origin_trials/origin_trial_key_manager.h"
+
+#include <stdint.h>
+
+// This is the default public key used for validating signatures.
+// TODO(iclelland): Provide a mechanism to allow for multiple signing keys.
+// https://crbug.com/584737
+// TODO(iclelland): Provide a mechanism to override, replace or disable this key
+// with field trials.
+static const uint8_t kPublicKey[] = {
+ 0x7c, 0xc4, 0xb8, 0x9a, 0x93, 0xba, 0x6e, 0xe2, 0xd0, 0xfd, 0x03,
+ 0x1d, 0xfb, 0x32, 0x66, 0xc7, 0x3b, 0x72, 0xfd, 0x54, 0x3a, 0x07,
+ 0x51, 0x14, 0x66, 0xaa, 0x02, 0x53, 0x4e, 0x33, 0xa1, 0x15,
+};
+
+base::StringPiece OriginTrialKeyManager::GetPublicKey() {
+ return base::StringPiece(reinterpret_cast<const char*>(kPublicKey),
+ arraysize(kPublicKey));
+}
« no previous file with comments | « chrome/renderer/origin_trials/origin_trial_key_manager.h ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698