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

Side by Side Diff: chrome/browser/extensions/install_verifier.h

Issue 93513006: Allow re-enabling of DISABLE_NOT_VERIFIED extensions if appropriate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix a few nits Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_EXTENSIONS_INSTALL_VERIFIER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_
6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 27 matching lines...) Expand all
38 class InstallVerifier : public ManagementPolicy::Provider { 38 class InstallVerifier : public ManagementPolicy::Provider {
39 public: 39 public:
40 InstallVerifier(ExtensionPrefs* prefs, 40 InstallVerifier(ExtensionPrefs* prefs,
41 net::URLRequestContextGetter* context_getter); 41 net::URLRequestContextGetter* context_getter);
42 virtual ~InstallVerifier(); 42 virtual ~InstallVerifier();
43 43
44 // Initializes this object for use, including reading preferences and 44 // Initializes this object for use, including reading preferences and
45 // validating the stored signature. 45 // validating the stored signature.
46 void Init(); 46 void Init();
47 47
48 // Do we need to be bootstrapped? (i.e. do we have a signature already). If
49 // this is true, then consumers of this class should use Add/AddMany to get
50 // an initial one so that MustRemainDisabled can actually check against it.
51 bool NeedsBootstrap();
52
48 // A callback for indicating success/failure of adding new ids. 53 // A callback for indicating success/failure of adding new ids.
49 typedef base::Callback<void(bool)> AddResultCallback; 54 typedef base::Callback<void(bool)> AddResultCallback;
50 55
51 // Try adding a new |id| (or set of ids) to the list of verified ids. When 56 // Try adding a new |id| (or set of ids) to the list of verified ids. When
52 // this process is finished |callback| will be run with success/failure. In 57 // this process is finished |callback| will be run with success/failure of
53 // case of success, subsequent calls to IsVerified will begin returning true 58 // the signature request (not necessarily whether the ids were verified).
54 // for |id|.
55 void Add(const std::string& id, const AddResultCallback& callback); 59 void Add(const std::string& id, const AddResultCallback& callback);
56 void AddMany(const ExtensionIdSet& ids, 60 void AddMany(const ExtensionIdSet& ids,
57 const AddResultCallback& callback); 61 const AddResultCallback& callback);
58 62
59 // Call this to add a set of ids that will immediately be considered allowed, 63 // Call this to add a set of ids that will immediately be considered allowed,
60 // and kick off an aysnchronous request to Add. 64 // and kick off an aysnchronous request to Add.
61 void AddProvisional(const ExtensionIdSet& ids); 65 void AddProvisional(const ExtensionIdSet& ids);
62 66
63 // Removes an id or set of ids from the verified list. 67 // Removes an id or set of ids from the verified list.
64 void Remove(const std::string& id); 68 void Remove(const std::string& id);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // A set of ids that have been provisionally added, which we're willing to 131 // A set of ids that have been provisionally added, which we're willing to
128 // consider allowed until we hear back from the server signature request. 132 // consider allowed until we hear back from the server signature request.
129 ExtensionIdSet provisional_; 133 ExtensionIdSet provisional_;
130 134
131 DISALLOW_COPY_AND_ASSIGN(InstallVerifier); 135 DISALLOW_COPY_AND_ASSIGN(InstallVerifier);
132 }; 136 };
133 137
134 } // namespace extensions 138 } // namespace extensions
135 139
136 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_ 140 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_VERIFIER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/install_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698