| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 update_client::InstallerAttributes GetInstallerAttributes() const override; | 263 update_client::InstallerAttributes GetInstallerAttributes() const override; |
| 264 std::vector<std::string> GetMimeTypes() const override; |
| 264 | 265 |
| 265 std::string crx_id_; | 266 std::string crx_id_; |
| 266 std::string name_; | 267 std::string name_; |
| 267 RawWhitelistReadyCallback callback_; | 268 RawWhitelistReadyCallback callback_; |
| 268 | 269 |
| 269 DISALLOW_COPY_AND_ASSIGN(SupervisedUserWhitelistComponentInstallerTraits); | 270 DISALLOW_COPY_AND_ASSIGN(SupervisedUserWhitelistComponentInstallerTraits); |
| 270 }; | 271 }; |
| 271 | 272 |
| 272 bool SupervisedUserWhitelistComponentInstallerTraits::VerifyInstallation( | 273 bool SupervisedUserWhitelistComponentInstallerTraits::VerifyInstallation( |
| 273 const base::DictionaryValue& manifest, | 274 const base::DictionaryValue& manifest, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 std::string SupervisedUserWhitelistComponentInstallerTraits::GetName() const { | 320 std::string SupervisedUserWhitelistComponentInstallerTraits::GetName() const { |
| 320 return name_; | 321 return name_; |
| 321 } | 322 } |
| 322 | 323 |
| 323 update_client::InstallerAttributes | 324 update_client::InstallerAttributes |
| 324 SupervisedUserWhitelistComponentInstallerTraits::GetInstallerAttributes() | 325 SupervisedUserWhitelistComponentInstallerTraits::GetInstallerAttributes() |
| 325 const { | 326 const { |
| 326 return update_client::InstallerAttributes(); | 327 return update_client::InstallerAttributes(); |
| 327 } | 328 } |
| 328 | 329 |
| 330 std::vector<std::string> |
| 331 SupervisedUserWhitelistComponentInstallerTraits::GetMimeTypes() const { |
| 332 return std::vector<std::string>(); |
| 333 } |
| 334 |
| 329 class SupervisedUserWhitelistInstallerImpl | 335 class SupervisedUserWhitelistInstallerImpl |
| 330 : public SupervisedUserWhitelistInstaller, | 336 : public SupervisedUserWhitelistInstaller, |
| 331 public ProfileAttributesStorage::Observer { | 337 public ProfileAttributesStorage::Observer { |
| 332 public: | 338 public: |
| 333 SupervisedUserWhitelistInstallerImpl( | 339 SupervisedUserWhitelistInstallerImpl( |
| 334 ComponentUpdateService* cus, | 340 ComponentUpdateService* cus, |
| 335 ProfileAttributesStorage* profile_attributes_storage, | 341 ProfileAttributesStorage* profile_attributes_storage, |
| 336 PrefService* local_state); | 342 PrefService* local_state); |
| 337 ~SupervisedUserWhitelistInstallerImpl() override {} | 343 ~SupervisedUserWhitelistInstallerImpl() override {} |
| 338 | 344 |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 | 639 |
| 634 // static | 640 // static |
| 635 void SupervisedUserWhitelistInstaller::TriggerComponentUpdate( | 641 void SupervisedUserWhitelistInstaller::TriggerComponentUpdate( |
| 636 OnDemandUpdater* updater, | 642 OnDemandUpdater* updater, |
| 637 const std::string& crx_id) { | 643 const std::string& crx_id) { |
| 638 const bool result = updater->OnDemandUpdate(crx_id); | 644 const bool result = updater->OnDemandUpdate(crx_id); |
| 639 DCHECK(result); | 645 DCHECK(result); |
| 640 } | 646 } |
| 641 | 647 |
| 642 } // namespace component_updater | 648 } // namespace component_updater |
| OLD | NEW |