OLD | NEW |
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 void EVWhitelistComponentInstallerTraits::GetHash( | 124 void EVWhitelistComponentInstallerTraits::GetHash( |
125 std::vector<uint8_t>* hash) const { | 125 std::vector<uint8_t>* hash) const { |
126 hash->assign(kPublicKeySHA256, | 126 hash->assign(kPublicKeySHA256, |
127 kPublicKeySHA256 + arraysize(kPublicKeySHA256)); | 127 kPublicKeySHA256 + arraysize(kPublicKeySHA256)); |
128 } | 128 } |
129 | 129 |
130 std::string EVWhitelistComponentInstallerTraits::GetName() const { | 130 std::string EVWhitelistComponentInstallerTraits::GetName() const { |
131 return kEVWhitelistManifestName; | 131 return kEVWhitelistManifestName; |
132 } | 132 } |
133 | 133 |
134 std::string EVWhitelistComponentInstallerTraits::GetAp() const { | 134 update_client::InstallerAttributes |
135 return std::string(); | 135 EVWhitelistComponentInstallerTraits::GetInstallerAttributes() const { |
| 136 return update_client::InstallerAttributes(); |
136 } | 137 } |
137 | 138 |
138 void RegisterEVWhitelistComponent(ComponentUpdateService* cus, | 139 void RegisterEVWhitelistComponent(ComponentUpdateService* cus, |
139 const base::FilePath& user_data_dir) { | 140 const base::FilePath& user_data_dir) { |
140 VLOG(1) << "Registering EV whitelist component."; | 141 VLOG(1) << "Registering EV whitelist component."; |
141 | 142 |
142 std::unique_ptr<ComponentInstallerTraits> traits( | 143 std::unique_ptr<ComponentInstallerTraits> traits( |
143 new EVWhitelistComponentInstallerTraits()); | 144 new EVWhitelistComponentInstallerTraits()); |
144 // |cus| will take ownership of |installer| during installer->Register(cus). | 145 // |cus| will take ownership of |installer| during installer->Register(cus). |
145 DefaultComponentInstaller* installer = | 146 DefaultComponentInstaller* installer = |
146 new DefaultComponentInstaller(std::move(traits)); | 147 new DefaultComponentInstaller(std::move(traits)); |
147 installer->Register(cus, base::Closure()); | 148 installer->Register(cus, base::Closure()); |
148 | 149 |
149 content::BrowserThread::PostAfterStartupTask( | 150 content::BrowserThread::PostAfterStartupTask( |
150 FROM_HERE, content::BrowserThread::GetBlockingPool(), | 151 FROM_HERE, content::BrowserThread::GetBlockingPool(), |
151 base::Bind(&DeleteWhitelistCopy, user_data_dir)); | 152 base::Bind(&DeleteWhitelistCopy, user_data_dir)); |
152 } | 153 } |
153 | 154 |
154 } // namespace component_updater | 155 } // namespace component_updater |
OLD | NEW |