OLD | NEW |
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_SUPERVISED_USER_WHITELIST_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_SUPERVISED_USER_WHITELIST_INSTALLER_H_ |
6 #define CHROME_BROWSER_COMPONENT_UPDATER_SUPERVISED_USER_WHITELIST_INSTALLER_H_ | 6 #define CHROME_BROWSER_COMPONENT_UPDATER_SUPERVISED_USER_WHITELIST_INSTALLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 // Registers a new whitelist with the given CRX ID and name. | 40 // Registers a new whitelist with the given CRX ID and name. |
41 // |new_installation| should be set to true if the whitelist is not installed | 41 // |new_installation| should be set to true if the whitelist is not installed |
42 // locally yet, to trigger installation. | 42 // locally yet, to trigger installation. |
43 // |callback| will be called when the whitelist is installed (for new | 43 // |callback| will be called when the whitelist is installed (for new |
44 // installations) or updated. | 44 // installations) or updated. |
45 virtual void RegisterWhitelist(const std::string& crx_id, | 45 virtual void RegisterWhitelist(const std::string& crx_id, |
46 const std::string& name, | 46 const std::string& name, |
47 bool new_installation, | 47 bool new_installation, |
48 const WhitelistReadyCallback& callback) = 0; | 48 const WhitelistReadyCallback& callback) = 0; |
49 | 49 |
50 // Unregisters a whitelist. | 50 // Uninstalls a whitelist. |
51 virtual void UnregisterWhitelist(const std::string& crx_id) = 0; | 51 virtual void UninstallWhitelist(const std::string& crx_id) = 0; |
52 | 52 |
53 protected: | 53 protected: |
54 // Triggers an update for a whitelist to be installed. Protected so it can be | 54 // Triggers an update for a whitelist to be installed. Protected so it can be |
55 // called from the implementation subclass, and declared here so that the | 55 // called from the implementation subclass, and declared here so that the |
56 // OnDemandUpdater can friend this class and the implementation subclass can | 56 // OnDemandUpdater can friend this class and the implementation subclass can |
57 // live in an anonymous namespace. | 57 // live in an anonymous namespace. |
58 static void TriggerComponentUpdate(OnDemandUpdater* updater, | 58 static void TriggerComponentUpdate(OnDemandUpdater* updater, |
59 const std::string& crx_id); | 59 const std::string& crx_id); |
60 }; | 60 }; |
61 | 61 |
62 } // namespace component_updater | 62 } // namespace component_updater |
63 | 63 |
64 #endif // CHROME_BROWSER_COMPONENT_UPDATER_SUPERVISED_USER_WHITELIST_INSTALLER_
H_ | 64 #endif // CHROME_BROWSER_COMPONENT_UPDATER_SUPERVISED_USER_WHITELIST_INSTALLER_
H_ |
OLD | NEW |