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

Unified Diff: extensions/browser/sandboxed_unpacker.h

Issue 1080453002: Always destroy CrxInstaller on the UI Thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CrOZ Created 5 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/sandboxed_unpacker.h
diff --git a/extensions/browser/sandboxed_unpacker.h b/extensions/browser/sandboxed_unpacker.h
index 99a1ebbba84a5a0154bd92957ef1f980b93511c9..74b5e193268abcc80d16b71def3d411ed9f19940 100644
--- a/extensions/browser/sandboxed_unpacker.h
+++ b/extensions/browser/sandboxed_unpacker.h
@@ -9,7 +9,7 @@
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
-#include "base/memory/ref_counted.h"
+#include "base/memory/ref_counted_delete_on_message_loop.h"
#include "base/time/time.h"
#include "content/public/browser/utility_process_host_client.h"
#include "extensions/browser/crx_file_info.h"
@@ -31,8 +31,10 @@ namespace extensions {
class Extension;
class SandboxedUnpackerClient
- : public base::RefCountedThreadSafe<SandboxedUnpackerClient> {
+ : public base::RefCountedDeleteOnMessageLoop<SandboxedUnpackerClient> {
public:
+ SandboxedUnpackerClient(const scoped_refptr<base::MessageLoopProxy>& loop);
+
// temp_dir - A temporary directory containing the results of the extension
// unpacking. The client is responsible for deleting this directory.
//
@@ -53,7 +55,8 @@ class SandboxedUnpackerClient
virtual void OnUnpackFailure(const CrxInstallError& error) = 0;
protected:
- friend class base::RefCountedThreadSafe<SandboxedUnpackerClient>;
+ friend class base::RefCountedDeleteOnMessageLoop<SandboxedUnpackerClient>;
+ friend class base::DeleteHelper<SandboxedUnpackerClient>;
virtual ~SandboxedUnpackerClient() {}
};

Powered by Google App Engine
This is Rietveld 408576698