| Index: extensions/browser/content_verifier.h
|
| diff --git a/extensions/browser/content_verifier.h b/extensions/browser/content_verifier.h
|
| index edce70a5ef62a82af39d437ce9865fc85a446111..c62e82203e0ef1af218b5c62ed9075378b7ee92c 100644
|
| --- a/extensions/browser/content_verifier.h
|
| +++ b/extensions/browser/content_verifier.h
|
| @@ -7,8 +7,7 @@
|
|
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| -#include "base/observer_list_threadsafe.h"
|
| -#include "extensions/browser/content_verifier_filter.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "extensions/browser/content_verify_job.h"
|
|
|
| namespace base {
|
| @@ -21,13 +20,9 @@ class BrowserContext;
|
|
|
| namespace extensions {
|
|
|
| -// Interface for clients of ContentVerifier.
|
| -class ContentVerifierObserver {
|
| - public:
|
| - // Called when the content verifier detects that a read of a file inside
|
| - // an extension did not match its expected hash.
|
| - virtual void ContentVerifyFailed(const std::string& extension_id) = 0;
|
| -};
|
| +class Extension;
|
| +class ContentHashFetcher;
|
| +class ContentVerifierDelegate;
|
|
|
| // Used for managing overall content verification - both fetching content
|
| // hashes as needed, and supplying job objects to verify file contents as they
|
| @@ -35,7 +30,7 @@ class ContentVerifierObserver {
|
| class ContentVerifier : public base::RefCountedThreadSafe<ContentVerifier> {
|
| public:
|
| ContentVerifier(content::BrowserContext* context,
|
| - const ContentVerifierFilter& filter);
|
| + ContentVerifierDelegate* delegate);
|
| void Start();
|
| void Shutdown();
|
|
|
| @@ -50,20 +45,12 @@ class ContentVerifier : public base::RefCountedThreadSafe<ContentVerifier> {
|
| void VerifyFailed(const std::string& extension_id,
|
| ContentVerifyJob::FailureReason reason);
|
|
|
| - // Observers will be called back on the same thread that they call
|
| - // AddObserver on.
|
| - void AddObserver(ContentVerifierObserver* observer);
|
| - void RemoveObserver(ContentVerifierObserver* observer);
|
| -
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(ContentVerifier);
|
|
|
| friend class base::RefCountedThreadSafe<ContentVerifier>;
|
| virtual ~ContentVerifier();
|
|
|
| - // Attempts to fetch content hashes for |extension_id|.
|
| - void RequestFetch(const std::string& extension_id);
|
| -
|
| // Note that it is important for these to appear in increasing "severity"
|
| // order, because we use this to let command line flags increase, but not
|
| // decrease, the mode you're running in compared to the experiment group.
|
| @@ -88,14 +75,14 @@ class ContentVerifier : public base::RefCountedThreadSafe<ContentVerifier> {
|
| // The mode we're running in - set once at creation.
|
| const Mode mode_;
|
|
|
| - // The filter we use to decide whether to return a ContentVerifyJob.
|
| - ContentVerifierFilter filter_;
|
| -
|
| // The associated BrowserContext.
|
| content::BrowserContext* context_;
|
|
|
| - // The set of objects interested in verification failures.
|
| - scoped_refptr<ObserverListThreadSafe<ContentVerifierObserver> > observers_;
|
| + // Unowned pointer to our delegate.
|
| + ContentVerifierDelegate* delegate_;
|
| +
|
| + // For fetching content hash signatures.
|
| + scoped_ptr<ContentHashFetcher> fetcher_;
|
| };
|
|
|
| } // namespace extensions
|
|
|