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

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

Issue 2790823004: Retry reinstallation of corrupted policy extensions. (Closed)
Patch Set: address comments Created 3 years, 8 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 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_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_
6 #define CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // Whether there is pending extension install from sync. 69 // Whether there is pending extension install from sync.
70 bool HasPendingExtensionFromSync() const; 70 bool HasPendingExtensionFromSync() const;
71 71
72 // Notifies the manager that we are reinstalling the policy force-installed 72 // Notifies the manager that we are reinstalling the policy force-installed
73 // extension with |id| because we detected corruption in the current copy. 73 // extension with |id| because we detected corruption in the current copy.
74 void ExpectPolicyReinstallForCorruption(const ExtensionId& id); 74 void ExpectPolicyReinstallForCorruption(const ExtensionId& id);
75 75
76 // Are we expecting a reinstall of the extension with |id| due to corruption? 76 // Are we expecting a reinstall of the extension with |id| due to corruption?
77 bool IsPolicyReinstallForCorruptionExpected(const ExtensionId& id) const; 77 bool IsPolicyReinstallForCorruptionExpected(const ExtensionId& id) const;
78 78
79 // Whether or not there are any corrupted policy extensions.
80 bool HasAnyPolicyReinstallForCorruption() const;
81
79 // Adds an extension in a pending state; the extension with the 82 // Adds an extension in a pending state; the extension with the
80 // given info will be installed on the next auto-update cycle. 83 // given info will be installed on the next auto-update cycle.
81 // Return true if the extension was added. Will return false 84 // Return true if the extension was added. Will return false
82 // if the extension is pending from another source which overrides 85 // if the extension is pending from another source which overrides
83 // sync installs (such as a policy extension) or if the extension 86 // sync installs (such as a policy extension) or if the extension
84 // is already installed. 87 // is already installed.
85 // After installation, the extension will be granted permissions iff 88 // After installation, the extension will be granted permissions iff
86 // |version| is valid and matches the actual installed version. 89 // |version| is valid and matches the actual installed version.
87 bool AddFromSync( 90 bool AddFromSync(
88 const std::string& id, 91 const std::string& id,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 friend void SetupPendingExtensionManagerForTest( 162 friend void SetupPendingExtensionManagerForTest(
160 int count, const GURL& update_url, 163 int count, const GURL& update_url,
161 PendingExtensionManager* pending_extension_manager); 164 PendingExtensionManager* pending_extension_manager);
162 165
163 DISALLOW_COPY_AND_ASSIGN(PendingExtensionManager); 166 DISALLOW_COPY_AND_ASSIGN(PendingExtensionManager);
164 }; 167 };
165 168
166 } // namespace extensions 169 } // namespace extensions
167 170
168 #endif // CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ 171 #endif // CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/pending_extension_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698