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

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

Issue 1937683002: Implement support in DefaultComponentInstaller for picking up bundled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments through #35 Created 4 years, 7 months 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // ComponentInstallerTraits implementation. 50 // ComponentInstallerTraits implementation.
51 bool CanAutoUpdate() const override; 51 bool CanAutoUpdate() const override;
52 bool RequiresNetworkEncryption() const override; 52 bool RequiresNetworkEncryption() const override;
53 bool OnCustomInstall(const base::DictionaryValue& manifest, 53 bool OnCustomInstall(const base::DictionaryValue& manifest,
54 const base::FilePath& install_dir) override; 54 const base::FilePath& install_dir) override;
55 bool VerifyInstallation(const base::DictionaryValue& manifest, 55 bool VerifyInstallation(const base::DictionaryValue& manifest,
56 const base::FilePath& install_dir) const override; 56 const base::FilePath& install_dir) const override;
57 void ComponentReady(const base::Version& version, 57 void ComponentReady(const base::Version& version,
58 const base::FilePath& install_dir, 58 const base::FilePath& install_dir,
59 std::unique_ptr<base::DictionaryValue> manifest) override; 59 std::unique_ptr<base::DictionaryValue> manifest) override;
60 base::FilePath GetBaseDirectory() const override; 60 base::FilePath GetRelativeInstallDir() const override;
61 void GetHash(std::vector<uint8_t>* hash) const override; 61 void GetHash(std::vector<uint8_t>* hash) const override;
62 std::string GetName() const override; 62 std::string GetName() const override;
63 std::string GetAp() const override; 63 std::string GetAp() const override;
64 64
65 // Reads and parses the on-disk json. 65 // Reads and parses the on-disk json.
66 void LoadSTHsFromDisk(const base::FilePath& sths_file_path, 66 void LoadSTHsFromDisk(const base::FilePath& sths_file_path,
67 const base::Version& version); 67 const base::Version& version);
68 68
69 // Handle successful parsing of JSON by distributing the new STH. 69 // Handle successful parsing of JSON by distributing the new STH.
70 void OnJsonParseSuccess(const std::string& log_id, 70 void OnJsonParseSuccess(const std::string& log_id,
71 std::unique_ptr<base::Value> parsed_json); 71 std::unique_ptr<base::Value> parsed_json);
72 72
73 // STH parsing failed - do nothing. 73 // STH parsing failed - do nothing.
74 void OnJsonParseError(const std::string& log_id, const std::string& error); 74 void OnJsonParseError(const std::string& log_id, const std::string& error);
75 75
76 std::unique_ptr<net::ct::STHObserver> sth_observer_; 76 std::unique_ptr<net::ct::STHObserver> sth_observer_;
77 77
78 DISALLOW_COPY_AND_ASSIGN(STHSetComponentInstallerTraits); 78 DISALLOW_COPY_AND_ASSIGN(STHSetComponentInstallerTraits);
79 }; 79 };
80 80
81 void RegisterSTHSetComponent(ComponentUpdateService* cus, 81 void RegisterSTHSetComponent(ComponentUpdateService* cus,
82 const base::FilePath& user_data_dir); 82 const base::FilePath& user_data_dir);
83 83
84 } // namespace component_updater 84 } // namespace component_updater
85 85
86 #endif // CHROME_BROWSER_COMPONENT_UPDATER_STH_SET_COMPONENT_INSTALLER_H_ 86 #endif // CHROME_BROWSER_COMPONENT_UPDATER_STH_SET_COMPONENT_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698