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

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

Issue 1986403002: Component updater for FileTypePolicies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replace_download_ext
Patch Set: Fix test's enum check Created 4 years, 6 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 2014 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_EV_WHITELIST_COMPONENT_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_FILE_TYPE_POLICIES_COMPONENT_INSTALLER_ H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ 6 #define CHROME_BROWSER_COMPONENT_UPDATER_FILE_TYPE_POLICIES_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 { 17 namespace base {
18 class FilePath; 18 class FilePath;
19 } // namespace base 19 } // namespace base
20 20
21 namespace component_updater { 21 namespace component_updater {
22 22
23 class ComponentUpdateService; 23 class ComponentUpdateService;
24 24
25 class EVWhitelistComponentInstallerTraits : public ComponentInstallerTraits { 25 class FileTypePoliciesComponentInstallerTraits
26 : public ComponentInstallerTraits {
26 public: 27 public:
27 EVWhitelistComponentInstallerTraits() {} 28 FileTypePoliciesComponentInstallerTraits() {}
28 ~EVWhitelistComponentInstallerTraits() override {} 29 ~FileTypePoliciesComponentInstallerTraits() override {}
29 30
30 private: 31 private:
31 // The following methods override ComponentInstallerTraits. 32 // The following methods override ComponentInstallerTraits.
32 bool CanAutoUpdate() const override; 33 bool CanAutoUpdate() const override;
33 bool RequiresNetworkEncryption() const override; 34 bool RequiresNetworkEncryption() const override;
34 bool OnCustomInstall(const base::DictionaryValue& manifest, 35 bool OnCustomInstall(const base::DictionaryValue& manifest,
35 const base::FilePath& install_dir) override; 36 const base::FilePath& install_dir) override;
36 bool VerifyInstallation(const base::DictionaryValue& manifest, 37 bool VerifyInstallation(const base::DictionaryValue& manifest,
37 const base::FilePath& install_dir) const override; 38 const base::FilePath& install_dir) const override;
38 void ComponentReady(const base::Version& version, 39 void ComponentReady(const base::Version& version,
39 const base::FilePath& install_dir, 40 const base::FilePath& install_dir,
40 std::unique_ptr<base::DictionaryValue> manifest) override; 41 std::unique_ptr<base::DictionaryValue> manifest) override;
41 base::FilePath GetRelativeInstallDir() const override; 42 base::FilePath GetRelativeInstallDir() const override;
42 void GetHash(std::vector<uint8_t>* hash) const override; 43 void GetHash(std::vector<uint8_t>* hash) const override;
43 std::string GetName() const override; 44 std::string GetName() const override;
44 std::string GetAp() const override; 45 std::string GetAp() const override;
45 46
46 static base::FilePath GetInstalledPath(const base::FilePath& base); 47 static base::FilePath GetInstalledPath(const base::FilePath& base);
47 48
48 DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits); 49 DISALLOW_COPY_AND_ASSIGN(FileTypePoliciesComponentInstallerTraits);
49 }; 50 };
50 51
51 // Call once during startup to make the component update service aware of 52 // Call once during startup to make the component update service aware of
52 // the EV whitelist. 53 // the File Type Policies component.
53 void RegisterEVWhitelistComponent(ComponentUpdateService* cus, 54 void RegisterFileTypePoliciesComponent(ComponentUpdateService* cus,
54 const base::FilePath& user_data_dir); 55 const base::FilePath& user_data_dir);
55 56
56 } // namespace component_updater 57 } // namespace component_updater
57 58
58 #endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ 59 #endif // CHROME_BROWSER_COMPONENT_UPDATER_FILE_TYPE_POLICIES_COMPONENT_INSTALL ER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/component_updater/file_type_policies_component_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698