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 #include <map> | 8 #include <map> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 bool CanAutoUpdate() const override; | 251 bool CanAutoUpdate() const override; |
252 bool RequiresNetworkEncryption() const override; | 252 bool RequiresNetworkEncryption() const override; |
253 bool OnCustomInstall(const base::DictionaryValue& manifest, | 253 bool OnCustomInstall(const base::DictionaryValue& manifest, |
254 const base::FilePath& install_dir) override; | 254 const base::FilePath& install_dir) override; |
255 void ComponentReady(const base::Version& version, | 255 void ComponentReady(const base::Version& version, |
256 const base::FilePath& install_dir, | 256 const base::FilePath& install_dir, |
257 scoped_ptr<base::DictionaryValue> manifest) override; | 257 scoped_ptr<base::DictionaryValue> manifest) override; |
258 base::FilePath GetBaseDirectory() const override; | 258 base::FilePath GetBaseDirectory() const override; |
259 void GetHash(std::vector<uint8_t>* hash) const override; | 259 void GetHash(std::vector<uint8_t>* hash) const override; |
260 std::string GetName() const override; | 260 std::string GetName() const override; |
| 261 std::string GetAp() const override; |
261 | 262 |
262 std::string crx_id_; | 263 std::string crx_id_; |
263 std::string name_; | 264 std::string name_; |
264 RawWhitelistReadyCallback callback_; | 265 RawWhitelistReadyCallback callback_; |
265 | 266 |
266 DISALLOW_COPY_AND_ASSIGN(SupervisedUserWhitelistComponentInstallerTraits); | 267 DISALLOW_COPY_AND_ASSIGN(SupervisedUserWhitelistComponentInstallerTraits); |
267 }; | 268 }; |
268 | 269 |
269 bool SupervisedUserWhitelistComponentInstallerTraits::VerifyInstallation( | 270 bool SupervisedUserWhitelistComponentInstallerTraits::VerifyInstallation( |
270 const base::DictionaryValue& manifest, | 271 const base::DictionaryValue& manifest, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 312 |
312 void SupervisedUserWhitelistComponentInstallerTraits::GetHash( | 313 void SupervisedUserWhitelistComponentInstallerTraits::GetHash( |
313 std::vector<uint8_t>* hash) const { | 314 std::vector<uint8_t>* hash) const { |
314 *hash = SupervisedUserWhitelistInstaller::GetHashFromCrxId(crx_id_); | 315 *hash = SupervisedUserWhitelistInstaller::GetHashFromCrxId(crx_id_); |
315 } | 316 } |
316 | 317 |
317 std::string SupervisedUserWhitelistComponentInstallerTraits::GetName() const { | 318 std::string SupervisedUserWhitelistComponentInstallerTraits::GetName() const { |
318 return name_; | 319 return name_; |
319 } | 320 } |
320 | 321 |
| 322 std::string SupervisedUserWhitelistComponentInstallerTraits::GetAp() const { |
| 323 return std::string(); |
| 324 } |
| 325 |
321 class SupervisedUserWhitelistInstallerImpl | 326 class SupervisedUserWhitelistInstallerImpl |
322 : public SupervisedUserWhitelistInstaller, | 327 : public SupervisedUserWhitelistInstaller, |
323 public ProfileAttributesStorage::Observer { | 328 public ProfileAttributesStorage::Observer { |
324 public: | 329 public: |
325 SupervisedUserWhitelistInstallerImpl( | 330 SupervisedUserWhitelistInstallerImpl( |
326 ComponentUpdateService* cus, | 331 ComponentUpdateService* cus, |
327 ProfileAttributesStorage* profile_attributes_storage, | 332 ProfileAttributesStorage* profile_attributes_storage, |
328 PrefService* local_state); | 333 PrefService* local_state); |
329 ~SupervisedUserWhitelistInstallerImpl() override {} | 334 ~SupervisedUserWhitelistInstallerImpl() override {} |
330 | 335 |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 | 630 |
626 // static | 631 // static |
627 void SupervisedUserWhitelistInstaller::TriggerComponentUpdate( | 632 void SupervisedUserWhitelistInstaller::TriggerComponentUpdate( |
628 OnDemandUpdater* updater, | 633 OnDemandUpdater* updater, |
629 const std::string& crx_id) { | 634 const std::string& crx_id) { |
630 const bool result = updater->OnDemandUpdate(crx_id); | 635 const bool result = updater->OnDemandUpdate(crx_id); |
631 DCHECK(result); | 636 DCHECK(result); |
632 } | 637 } |
633 | 638 |
634 } // namespace component_updater | 639 } // namespace component_updater |
OLD | NEW |