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

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

Issue 1872053002: Implement an API to allow passing an "ap" parameter to component updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ev_whitelist_component_installer.h" 5 #include "chrome/browser/component_updater/ev_whitelist_component_installer.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void EVWhitelistComponentInstallerTraits::GetHash( 125 void EVWhitelistComponentInstallerTraits::GetHash(
126 std::vector<uint8_t>* hash) const { 126 std::vector<uint8_t>* hash) const {
127 hash->assign(kPublicKeySHA256, 127 hash->assign(kPublicKeySHA256,
128 kPublicKeySHA256 + arraysize(kPublicKeySHA256)); 128 kPublicKeySHA256 + arraysize(kPublicKeySHA256));
129 } 129 }
130 130
131 std::string EVWhitelistComponentInstallerTraits::GetName() const { 131 std::string EVWhitelistComponentInstallerTraits::GetName() const {
132 return kEVWhitelistManifestName; 132 return kEVWhitelistManifestName;
133 } 133 }
134 134
135 std::string EVWhitelistComponentInstallerTraits::GetAp() const {
136 return std::string();
137 }
138
135 void RegisterEVWhitelistComponent(ComponentUpdateService* cus, 139 void RegisterEVWhitelistComponent(ComponentUpdateService* cus,
136 const base::FilePath& user_data_dir) { 140 const base::FilePath& user_data_dir) {
137 VLOG(1) << "Registering EV whitelist component."; 141 VLOG(1) << "Registering EV whitelist component.";
138 142
139 scoped_ptr<ComponentInstallerTraits> traits( 143 scoped_ptr<ComponentInstallerTraits> traits(
140 new EVWhitelistComponentInstallerTraits()); 144 new EVWhitelistComponentInstallerTraits());
141 // |cus| will take ownership of |installer| during installer->Register(cus). 145 // |cus| will take ownership of |installer| during installer->Register(cus).
142 DefaultComponentInstaller* installer = 146 DefaultComponentInstaller* installer =
143 new DefaultComponentInstaller(std::move(traits)); 147 new DefaultComponentInstaller(std::move(traits));
144 installer->Register(cus, base::Closure()); 148 installer->Register(cus, base::Closure());
145 149
146 content::BrowserThread::PostAfterStartupTask( 150 content::BrowserThread::PostAfterStartupTask(
147 FROM_HERE, content::BrowserThread::GetBlockingPool(), 151 FROM_HERE, content::BrowserThread::GetBlockingPool(),
148 base::Bind(&DeleteWhitelistCopy, user_data_dir)); 152 base::Bind(&DeleteWhitelistCopy, user_data_dir));
149 } 153 }
150 154
151 } // namespace component_updater 155 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698