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

Unified Diff: chrome/browser/extensions/install_verifier.h

Issue 464463003: Adding logging of offstore extensions state to user metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/install_verifier.h
diff --git a/chrome/browser/extensions/install_verifier.h b/chrome/browser/extensions/install_verifier.h
index 47b44077842a9e1b5e1f2cb670a20fdcf4da22a8..8c2a442e8aecd8411b419e0f328a2d5817102f8c 100644
--- a/chrome/browser/extensions/install_verifier.h
+++ b/chrome/browser/extensions/install_verifier.h
@@ -48,6 +48,9 @@ class InstallVerifier : public ManagementPolicy::Provider {
// Returns whether |extension| is of a type that needs verification.
static bool NeedsVerification(const Extension& extension);
+ // Determines if an extension claims to be from the webstore.
+ static bool IsFromStore(const Extension& extension);
+
// Initializes this object for use, including reading preferences and
// validating the stored signature.
void Init();
@@ -57,7 +60,11 @@ class InstallVerifier : public ManagementPolicy::Provider {
// Returns true if |id| is either verified or our stored signature explicitly
// tells us that it was invalid when we asked the server about it.
- bool IsKnownId(const std::string& id);
+ bool IsKnownId(const std::string& id) const;
+
+ // Returns whether the given |id| is considered invalid by our verified
+ // signature.
+ bool IsInvalid(const std::string& id) const;
// Attempts to verify a single extension and add it to the verified list.
void VerifyExtension(const std::string& extension_id);
@@ -73,6 +80,9 @@ class InstallVerifier : public ManagementPolicy::Provider {
void Remove(const std::string& id);
void RemoveMany(const ExtensionIdSet& ids);
+ // Returns whether an extension id is allowed by policy.
+ bool AllowedByEnterprisePolicy(const std::string& id) const;
+
// ManagementPolicy::Provider interface.
virtual std::string GetDebugPolicyProviderName() const OVERRIDE;
virtual bool MustRemainDisabled(const Extension* extension,
@@ -118,9 +128,6 @@ class InstallVerifier : public ManagementPolicy::Provider {
// Removes any no-longer-installed ids, requesting a new signature if needed.
void GarbageCollect();
- // Returns whether an extension id is allowed by policy.
- bool AllowedByEnterprisePolicy(const std::string& id) const;
-
// Returns whether the given |id| is included in our verified signature.
bool IsVerified(const std::string& id) const;
« no previous file with comments | « no previous file | chrome/browser/extensions/install_verifier.cc » ('j') | chrome/browser/metrics/chrome_metrics_service_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698