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

Side by Side Diff: chrome/browser/component_updater/origin_trials_component_installer.cc

Issue 2642823007: Fix Origin Trials configuration component id (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/browser/component_updater/origin_trials_component_installer.h" 5 #include "chrome/browser/component_updater/origin_trials_component_installer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 26 matching lines...) Expand all
37 37
38 namespace component_updater { 38 namespace component_updater {
39 39
40 namespace { 40 namespace {
41 41
42 static const char kManifestOriginTrialsKey[] = "origin-trials"; 42 static const char kManifestOriginTrialsKey[] = "origin-trials";
43 static const char kManifestPublicKeyPath[] = "origin-trials.public-key"; 43 static const char kManifestPublicKeyPath[] = "origin-trials.public-key";
44 static const char kManifestDisabledFeaturesPath[] = 44 static const char kManifestDisabledFeaturesPath[] =
45 "origin-trials.disabled-features"; 45 "origin-trials.disabled-features";
46 46
47 // Extension id is kfoklmclfodeliojeaekpoflbkkhojea 47 // Extension id is llkgjffcdpffmhiakmfcdcblohccpfmo
48 const uint8_t kSha256Hash[] = {0xa5, 0xea, 0xbc, 0x2b, 0x5e, 0x34, 0xb8, 0xe9, 48 const uint8_t kSha256Hash[] = {0xbb, 0xa6, 0x95, 0x52, 0x3f, 0x55, 0xc7, 0x80,
49 0x40, 0x4a, 0xfe, 0x5b, 0x1a, 0xa7, 0xe9, 0x40, 49 0xac, 0x52, 0x32, 0x1b, 0xe7, 0x22, 0xf5, 0xce,
50 0xa8, 0xc5, 0xef, 0xa1, 0x9e, 0x20, 0x5a, 0x39, 50 0x6a, 0xfd, 0x9c, 0x9e, 0xa9, 0x2a, 0x0b, 0x50,
51 0x73, 0x98, 0x98, 0x0f, 0x7a, 0x76, 0x62, 0xfa}; 51 0x60, 0x2b, 0x7f, 0x6c, 0x64, 0x80, 0x09, 0x04};
52 52
53 } // namespace 53 } // namespace
54 54
55 bool OriginTrialsComponentInstallerTraits::VerifyInstallation( 55 bool OriginTrialsComponentInstallerTraits::VerifyInstallation(
56 const base::DictionaryValue& manifest, 56 const base::DictionaryValue& manifest,
57 const base::FilePath& install_dir) const { 57 const base::FilePath& install_dir) const {
58 // Test if the "origin-trials" key is present in the manifest. 58 // Test if the "origin-trials" key is present in the manifest.
59 return manifest.HasKey(kManifestOriginTrialsKey); 59 return manifest.HasKey(kManifestOriginTrialsKey);
60 } 60 }
61 61
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 const base::FilePath& user_data_dir) { 133 const base::FilePath& user_data_dir) {
134 std::unique_ptr<ComponentInstallerTraits> traits( 134 std::unique_ptr<ComponentInstallerTraits> traits(
135 new OriginTrialsComponentInstallerTraits()); 135 new OriginTrialsComponentInstallerTraits());
136 // |cus| will take ownership of |installer| during installer->Register(cus). 136 // |cus| will take ownership of |installer| during installer->Register(cus).
137 DefaultComponentInstaller* installer = 137 DefaultComponentInstaller* installer =
138 new DefaultComponentInstaller(std::move(traits)); 138 new DefaultComponentInstaller(std::move(traits));
139 installer->Register(cus, base::Closure()); 139 installer->Register(cus, base::Closure());
140 } 140 }
141 141
142 } // namespace component_updater 142 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698