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

Side by Side Diff: chrome/browser/component_updater/sth_set_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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_STH_SET_COMPONENT_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_STH_SET_COMPONENT_INSTALLER_H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_STH_SET_COMPONENT_INSTALLER_H_ 6 #define CHROME_BROWSER_COMPONENT_UPDATER_STH_SET_COMPONENT_INSTALLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // The |sth_distributor| will be notified each time a new STH is observed. 43 // The |sth_distributor| will be notified each time a new STH is observed.
44 explicit STHSetComponentInstallerTraits(net::ct::STHObserver* sth_observer); 44 explicit STHSetComponentInstallerTraits(net::ct::STHObserver* sth_observer);
45 ~STHSetComponentInstallerTraits() override; 45 ~STHSetComponentInstallerTraits() override;
46 46
47 private: 47 private:
48 friend class STHSetComponentInstallerTest; 48 friend class STHSetComponentInstallerTest;
49 49
50 // ComponentInstallerTraits implementation. 50 // ComponentInstallerTraits implementation.
51 bool SupportsGroupPolicyEnabledComponentUpdates() const override; 51 bool SupportsGroupPolicyEnabledComponentUpdates() const override;
52 bool RequiresNetworkEncryption() const override; 52 bool RequiresNetworkEncryption() const override;
53 bool OnCustomInstall(const base::DictionaryValue& manifest, 53 update_client::CrxInstaller::Result OnCustomInstall(
54 const base::FilePath& install_dir) override; 54 const base::DictionaryValue& manifest,
55 const base::FilePath& install_dir) override;
55 bool VerifyInstallation(const base::DictionaryValue& manifest, 56 bool VerifyInstallation(const base::DictionaryValue& manifest,
56 const base::FilePath& install_dir) const override; 57 const base::FilePath& install_dir) const override;
57 void ComponentReady(const base::Version& version, 58 void ComponentReady(const base::Version& version,
58 const base::FilePath& install_dir, 59 const base::FilePath& install_dir,
59 std::unique_ptr<base::DictionaryValue> manifest) override; 60 std::unique_ptr<base::DictionaryValue> manifest) override;
60 base::FilePath GetRelativeInstallDir() const override; 61 base::FilePath GetRelativeInstallDir() const override;
61 void GetHash(std::vector<uint8_t>* hash) const override; 62 void GetHash(std::vector<uint8_t>* hash) const override;
62 std::string GetName() const override; 63 std::string GetName() const override;
63 update_client::InstallerAttributes GetInstallerAttributes() const override; 64 update_client::InstallerAttributes GetInstallerAttributes() const override;
64 std::vector<std::string> GetMimeTypes() const override; 65 std::vector<std::string> GetMimeTypes() const override;
(...skipping 18 matching lines...) Expand all
83 84
84 DISALLOW_COPY_AND_ASSIGN(STHSetComponentInstallerTraits); 85 DISALLOW_COPY_AND_ASSIGN(STHSetComponentInstallerTraits);
85 }; 86 };
86 87
87 void RegisterSTHSetComponent(ComponentUpdateService* cus, 88 void RegisterSTHSetComponent(ComponentUpdateService* cus,
88 const base::FilePath& user_data_dir); 89 const base::FilePath& user_data_dir);
89 90
90 } // namespace component_updater 91 } // namespace component_updater
91 92
92 #endif // CHROME_BROWSER_COMPONENT_UPDATER_STH_SET_COMPONENT_INSTALLER_H_ 93 #endif // CHROME_BROWSER_COMPONENT_UPDATER_STH_SET_COMPONENT_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698