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

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

Issue 266963003: Beginning of support for extension content verification (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: oops, forgot to upload minor cosmetic changes to test Created 6 years, 7 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/extension_system_impl.h
diff --git a/chrome/browser/extensions/extension_system_impl.h b/chrome/browser/extensions/extension_system_impl.h
index 90c8c820965c4ea2cab1bdfb2d1ae9df3eadabaa..27aa2e7e05b4d846adf68ad6867cb31066fc9a97 100644
--- a/chrome/browser/extensions/extension_system_impl.h
+++ b/chrome/browser/extensions/extension_system_impl.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_
+#include "extensions/browser/content_verifier.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/one_shot_event.h"
@@ -12,6 +13,7 @@ class Profile;
namespace extensions {
+class ContentVerifier;
class ExtensionSystemSharedFactory;
class ExtensionWarningBadgeService;
class NavigationObserver;
@@ -57,13 +59,14 @@ class ExtensionSystemImpl : public ExtensionSystem {
const UnloadedExtensionInfo::Reason reason) OVERRIDE;
virtual const OneShotEvent& ready() const OVERRIDE;
+ virtual ContentVerifier* content_verifier() OVERRIDE; // shared
private:
friend class ExtensionSystemSharedFactory;
// Owns the Extension-related systems that have a single instance
// shared between normal and incognito profiles.
- class Shared : public KeyedService {
+ class Shared : public KeyedService, public ContentVerifierObserver {
public:
explicit Shared(Profile* profile);
virtual ~Shared();
@@ -77,6 +80,9 @@ class ExtensionSystemImpl : public ExtensionSystem {
// KeyedService implementation.
virtual void Shutdown() OVERRIDE;
+ // ContentVerifierObserver implementation.
+ virtual void ContentVerifyFailed(const std::string& extension_id) OVERRIDE;
+
StateStore* state_store();
StateStore* rules_store();
ExtensionService* extension_service();
@@ -92,6 +98,7 @@ class ExtensionSystemImpl : public ExtensionSystem {
InstallVerifier* install_verifier();
QuotaService* quota_service();
const OneShotEvent& ready() const { return ready_; }
+ ContentVerifier* content_verifier();
private:
Profile* profile_;
@@ -122,6 +129,9 @@ class ExtensionSystemImpl : public ExtensionSystem {
scoped_ptr<InstallVerifier> install_verifier_;
scoped_ptr<QuotaService> quota_service_;
+ // For verifying the contents of extensions read from disk.
+ scoped_refptr<ContentVerifier> content_verifier_;
+
#if defined(OS_CHROMEOS)
scoped_ptr<chromeos::DeviceLocalAccountManagementPolicyProvider>
device_local_account_management_policy_provider_;

Powered by Google App Engine
This is Rietveld 408576698