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

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

Issue 10832105: Ensure that the WebstoreInstaller is always deleted on the UI thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/webstore_installer.h
diff --git a/chrome/browser/extensions/webstore_installer.h b/chrome/browser/extensions/webstore_installer.h
index 8d2ebb1100df00944cbd31c221b4e6797b744754..aaf95fbc18bfa620af3e3b0a938b5e5ef99e942c 100644
--- a/chrome/browser/extensions/webstore_installer.h
+++ b/chrome/browser/extensions/webstore_installer.h
@@ -12,6 +12,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_id.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/notification_observer.h"
@@ -29,9 +30,10 @@ class NavigationController;
namespace extensions {
// Downloads and installs extensions from the web store.
-class WebstoreInstaller : public content::NotificationObserver,
- public content::DownloadItem::Observer,
- public base::RefCounted<WebstoreInstaller> {
+class WebstoreInstaller :public content::NotificationObserver,
miket_OOO 2012/08/02 15:53:55 I liked the old whitespace better.
+ public content::DownloadItem::Observer,
+ public base::RefCountedThreadSafe<
+ WebstoreInstaller, content::BrowserThread::DeleteOnUIThread> {
public:
enum Flag {
FLAG_NONE = 0,
@@ -125,7 +127,9 @@ class WebstoreInstaller : public content::NotificationObserver,
static void SetDownloadDirectoryForTests(FilePath* directory);
private:
- friend class base::RefCounted<WebstoreInstaller>;
+ friend struct content::BrowserThread::DeleteOnThread<
+ content::BrowserThread::UI>;
+ friend class base::DeleteHelper<WebstoreInstaller>;
virtual ~WebstoreInstaller();
// DownloadManager::DownloadUrl callback.
« no previous file with comments | « no previous file | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698