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

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

Issue 2479633003: Makes the component installers return a Result instead of a bool. (Closed)
Patch Set: rebase Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/component_updater/ev_whitelist_component_installer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ 6 #define CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 14 matching lines...) Expand all
25 25
26 class EVWhitelistComponentInstallerTraits : public ComponentInstallerTraits { 26 class EVWhitelistComponentInstallerTraits : public ComponentInstallerTraits {
27 public: 27 public:
28 EVWhitelistComponentInstallerTraits() {} 28 EVWhitelistComponentInstallerTraits() {}
29 ~EVWhitelistComponentInstallerTraits() override {} 29 ~EVWhitelistComponentInstallerTraits() override {}
30 30
31 private: 31 private:
32 // The following methods override ComponentInstallerTraits. 32 // The following methods override ComponentInstallerTraits.
33 bool SupportsGroupPolicyEnabledComponentUpdates() const override; 33 bool SupportsGroupPolicyEnabledComponentUpdates() const override;
34 bool RequiresNetworkEncryption() const override; 34 bool RequiresNetworkEncryption() const override;
35 bool OnCustomInstall(const base::DictionaryValue& manifest, 35 update_client::CrxInstaller::Result OnCustomInstall(
36 const base::FilePath& install_dir) override; 36 const base::DictionaryValue& manifest,
37 const base::FilePath& install_dir) override;
37 bool VerifyInstallation(const base::DictionaryValue& manifest, 38 bool VerifyInstallation(const base::DictionaryValue& manifest,
38 const base::FilePath& install_dir) const override; 39 const base::FilePath& install_dir) const override;
39 void ComponentReady(const base::Version& version, 40 void ComponentReady(const base::Version& version,
40 const base::FilePath& install_dir, 41 const base::FilePath& install_dir,
41 std::unique_ptr<base::DictionaryValue> manifest) override; 42 std::unique_ptr<base::DictionaryValue> manifest) override;
42 base::FilePath GetRelativeInstallDir() const override; 43 base::FilePath GetRelativeInstallDir() const override;
43 void GetHash(std::vector<uint8_t>* hash) const override; 44 void GetHash(std::vector<uint8_t>* hash) const override;
44 std::string GetName() const override; 45 std::string GetName() const override;
45 update_client::InstallerAttributes GetInstallerAttributes() const override; 46 update_client::InstallerAttributes GetInstallerAttributes() const override;
46 std::vector<std::string> GetMimeTypes() const override; 47 std::vector<std::string> GetMimeTypes() const override;
47 48
48 static base::FilePath GetInstalledPath(const base::FilePath& base); 49 static base::FilePath GetInstalledPath(const base::FilePath& base);
49 50
50 DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits); 51 DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits);
51 }; 52 };
52 53
53 // Call once during startup to make the component update service aware of 54 // Call once during startup to make the component update service aware of
54 // the EV whitelist. 55 // the EV whitelist.
55 void RegisterEVWhitelistComponent(ComponentUpdateService* cus, 56 void RegisterEVWhitelistComponent(ComponentUpdateService* cus,
56 const base::FilePath& user_data_dir); 57 const base::FilePath& user_data_dir);
57 58
58 } // namespace component_updater 59 } // namespace component_updater
59 60
60 #endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ 61 #endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/component_updater/ev_whitelist_component_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698