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/supervised_user_whitelist_installer.h
" | 5 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h
" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 bool CanAutoUpdate() const override; | 253 bool CanAutoUpdate() const override; |
254 bool RequiresNetworkEncryption() const override; | 254 bool RequiresNetworkEncryption() const override; |
255 bool OnCustomInstall(const base::DictionaryValue& manifest, | 255 bool OnCustomInstall(const base::DictionaryValue& manifest, |
256 const base::FilePath& install_dir) override; | 256 const base::FilePath& install_dir) override; |
257 void ComponentReady(const base::Version& version, | 257 void ComponentReady(const base::Version& version, |
258 const base::FilePath& install_dir, | 258 const base::FilePath& install_dir, |
259 std::unique_ptr<base::DictionaryValue> manifest) override; | 259 std::unique_ptr<base::DictionaryValue> manifest) override; |
260 base::FilePath GetRelativeInstallDir() const override; | 260 base::FilePath GetRelativeInstallDir() const override; |
261 void GetHash(std::vector<uint8_t>* hash) const override; | 261 void GetHash(std::vector<uint8_t>* hash) const override; |
262 std::string GetName() const override; | 262 std::string GetName() const override; |
263 std::string GetAp() const override; | 263 update_client::InstallerAttributes GetInstallerAttributes() const override; |
264 | 264 |
265 std::string crx_id_; | 265 std::string crx_id_; |
266 std::string name_; | 266 std::string name_; |
267 RawWhitelistReadyCallback callback_; | 267 RawWhitelistReadyCallback callback_; |
268 | 268 |
269 DISALLOW_COPY_AND_ASSIGN(SupervisedUserWhitelistComponentInstallerTraits); | 269 DISALLOW_COPY_AND_ASSIGN(SupervisedUserWhitelistComponentInstallerTraits); |
270 }; | 270 }; |
271 | 271 |
272 bool SupervisedUserWhitelistComponentInstallerTraits::VerifyInstallation( | 272 bool SupervisedUserWhitelistComponentInstallerTraits::VerifyInstallation( |
273 const base::DictionaryValue& manifest, | 273 const base::DictionaryValue& manifest, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 313 |
314 void SupervisedUserWhitelistComponentInstallerTraits::GetHash( | 314 void SupervisedUserWhitelistComponentInstallerTraits::GetHash( |
315 std::vector<uint8_t>* hash) const { | 315 std::vector<uint8_t>* hash) const { |
316 *hash = SupervisedUserWhitelistInstaller::GetHashFromCrxId(crx_id_); | 316 *hash = SupervisedUserWhitelistInstaller::GetHashFromCrxId(crx_id_); |
317 } | 317 } |
318 | 318 |
319 std::string SupervisedUserWhitelistComponentInstallerTraits::GetName() const { | 319 std::string SupervisedUserWhitelistComponentInstallerTraits::GetName() const { |
320 return name_; | 320 return name_; |
321 } | 321 } |
322 | 322 |
323 std::string SupervisedUserWhitelistComponentInstallerTraits::GetAp() const { | 323 update_client::InstallerAttributes |
324 return std::string(); | 324 SupervisedUserWhitelistComponentInstallerTraits::GetInstallerAttributes() |
| 325 const { |
| 326 return update_client::InstallerAttributes(); |
325 } | 327 } |
326 | 328 |
327 class SupervisedUserWhitelistInstallerImpl | 329 class SupervisedUserWhitelistInstallerImpl |
328 : public SupervisedUserWhitelistInstaller, | 330 : public SupervisedUserWhitelistInstaller, |
329 public ProfileAttributesStorage::Observer { | 331 public ProfileAttributesStorage::Observer { |
330 public: | 332 public: |
331 SupervisedUserWhitelistInstallerImpl( | 333 SupervisedUserWhitelistInstallerImpl( |
332 ComponentUpdateService* cus, | 334 ComponentUpdateService* cus, |
333 ProfileAttributesStorage* profile_attributes_storage, | 335 ProfileAttributesStorage* profile_attributes_storage, |
334 PrefService* local_state); | 336 PrefService* local_state); |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 | 633 |
632 // static | 634 // static |
633 void SupervisedUserWhitelistInstaller::TriggerComponentUpdate( | 635 void SupervisedUserWhitelistInstaller::TriggerComponentUpdate( |
634 OnDemandUpdater* updater, | 636 OnDemandUpdater* updater, |
635 const std::string& crx_id) { | 637 const std::string& crx_id) { |
636 const bool result = updater->OnDemandUpdate(crx_id); | 638 const bool result = updater->OnDemandUpdate(crx_id); |
637 DCHECK(result); | 639 DCHECK(result); |
638 } | 640 } |
639 | 641 |
640 } // namespace component_updater | 642 } // namespace component_updater |
OLD | NEW |