Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / install_verifier.h
index 47b4407..778a1a6 100644 (file)
@@ -43,11 +43,14 @@ struct InstallSignature;
 class InstallVerifier : public ManagementPolicy::Provider {
  public:
   InstallVerifier(ExtensionPrefs* prefs, content::BrowserContext* context);
-  virtual ~InstallVerifier();
+  ~InstallVerifier() override;
 
   // 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,11 +80,14 @@ 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,
-                                  Extension::DisableReason* reason,
-                                  base::string16* error) const OVERRIDE;
+  std::string GetDebugPolicyProviderName() const override;
+  bool MustRemainDisabled(const Extension* extension,
+                          Extension::DisableReason* reason,
+                          base::string16* error) const override;
 
  private:
   // We keep a list of operations to the current set of extensions.
@@ -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;