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

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

Issue 1408023003: Don't persist registrations for whitelists installed from the command line. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/component_updater/supervised_user_whitelist_installer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // shutdown or a crash). 57 // shutdown or a crash).
58 virtual void RegisterComponents() = 0; 58 virtual void RegisterComponents() = 0;
59 59
60 // Subscribes for notifications about available whitelists. Clients should 60 // Subscribes for notifications about available whitelists. Clients should
61 // filter out the whitelists they are interested in via the |crx_id| 61 // filter out the whitelists they are interested in via the |crx_id|
62 // parameter. 62 // parameter.
63 virtual void Subscribe(const WhitelistReadyCallback& callback) = 0; 63 virtual void Subscribe(const WhitelistReadyCallback& callback) = 0;
64 64
65 // Registers a new whitelist with the given |crx_id|. 65 // Registers a new whitelist with the given |crx_id|.
66 // The |client_id| should be a unique identifier for the client that is stable 66 // The |client_id| should be a unique identifier for the client that is stable
67 // across restarts. 67 // across restarts. If it is empty, the registration will not be persisted in
68 // Local State.
68 virtual void RegisterWhitelist(const std::string& client_id, 69 virtual void RegisterWhitelist(const std::string& client_id,
69 const std::string& crx_id, 70 const std::string& crx_id,
70 const std::string& name) = 0; 71 const std::string& name) = 0;
71 72
72 // Unregisters a whitelist. 73 // Unregisters a whitelist.
73 virtual void UnregisterWhitelist(const std::string& client_id, 74 virtual void UnregisterWhitelist(const std::string& client_id,
74 const std::string& crx_id) = 0; 75 const std::string& crx_id) = 0;
75 76
76 protected: 77 protected:
77 // Triggers an update for a whitelist to be installed. Protected so it can be 78 // Triggers an update for a whitelist to be installed. Protected so it can be
78 // called from the implementation subclass, and declared here so that the 79 // called from the implementation subclass, and declared here so that the
79 // OnDemandUpdater can friend this class and the implementation subclass can 80 // OnDemandUpdater can friend this class and the implementation subclass can
80 // live in an anonymous namespace. 81 // live in an anonymous namespace.
81 static void TriggerComponentUpdate(OnDemandUpdater* updater, 82 static void TriggerComponentUpdate(OnDemandUpdater* updater,
82 const std::string& crx_id); 83 const std::string& crx_id);
83 }; 84 };
84 85
85 } // namespace component_updater 86 } // namespace component_updater
86 87
87 #endif // CHROME_BROWSER_COMPONENT_UPDATER_SUPERVISED_USER_WHITELIST_INSTALLER_ H_ 88 #endif // CHROME_BROWSER_COMPONENT_UPDATER_SUPERVISED_USER_WHITELIST_INSTALLER_ H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/component_updater/supervised_user_whitelist_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698