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

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

Issue 657613002: Certificate Transparency: EV certificates whitelist support for ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ev_list_unpacking_redo
Patch Set: Addressing review comments (comment & formatting) Created 6 years 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 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 <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "components/component_updater/default_component_installer.h" 15 #include "components/component_updater/default_component_installer.h"
16 16
17 namespace base {
18 class FilePath;
19 } // namespace base
20
17 namespace component_updater { 21 namespace component_updater {
18 22
19 class ComponentUpdateService; 23 class ComponentUpdateService;
20 24
21 class EVWhitelistComponentInstallerTraits : public ComponentInstallerTraits { 25 class EVWhitelistComponentInstallerTraits : public ComponentInstallerTraits {
22 public: 26 public:
23 EVWhitelistComponentInstallerTraits(); 27 explicit EVWhitelistComponentInstallerTraits(const base::FilePath& base_path);
24 ~EVWhitelistComponentInstallerTraits() override {} 28 ~EVWhitelistComponentInstallerTraits() override {}
25 29
26 private: 30 private:
27 // The following methods override ComponentInstallerTraits. 31 // The following methods override ComponentInstallerTraits.
28 bool CanAutoUpdate() const override; 32 bool CanAutoUpdate() const override;
29 bool OnCustomInstall(const base::DictionaryValue& manifest, 33 bool OnCustomInstall(const base::DictionaryValue& manifest,
30 const base::FilePath& install_dir) override; 34 const base::FilePath& install_dir) override;
31 bool VerifyInstallation(const base::DictionaryValue& manifest, 35 bool VerifyInstallation(const base::DictionaryValue& manifest,
32 const base::FilePath& install_dir) const override; 36 const base::FilePath& install_dir) const override;
33 void ComponentReady(const base::Version& version, 37 void ComponentReady(const base::Version& version,
34 const base::FilePath& path, 38 const base::FilePath& path,
35 scoped_ptr<base::DictionaryValue> manifest) override; 39 scoped_ptr<base::DictionaryValue> manifest) override;
36 base::FilePath GetBaseDirectory() const override; 40 base::FilePath GetBaseDirectory() const override;
37 void GetHash(std::vector<uint8_t>* hash) const override; 41 void GetHash(std::vector<uint8_t>* hash) const override;
38 std::string GetName() const override; 42 std::string GetName() const override;
39 43
40 static base::FilePath GetInstalledPath(const base::FilePath& base); 44 static base::FilePath GetInstalledPath(const base::FilePath& base);
41 45
46 const base::FilePath ev_whitelist_path_;
47
42 DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits); 48 DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits);
43 }; 49 };
44 50
45 // Call once during startup to make the component update service aware of 51 // Call once during startup to make the component update service aware of
46 // the EV whitelist. 52 // the EV whitelist.
47 void RegisterEVWhitelistComponent(ComponentUpdateService* cus); 53 void RegisterEVWhitelistComponent(ComponentUpdateService* cus,
54 const base::FilePath& path);
48 55
49 } // namespace component_updater 56 } // namespace component_updater
50 57
51 #endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ 58 #endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698