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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service.h

Issue 8345033: Collect some histograms about signed binary downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: fix chromeos and valgrind Created 9 years, 2 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/safe_browsing/safe_browsing_service.h
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h
index ccf3ab0f751cda5da7a9286f4251c96aebd49d58..43a1c36c39b5f818142b5b2c1ea0656a84e9d242 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -23,6 +23,7 @@
#include "base/task.h"
#include "base/time.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
+#include "content/browser/browser_thread.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
@@ -49,7 +50,8 @@ class DownloadProtectionService;
// Construction needs to happen on the main thread.
class SafeBrowsingService
- : public base::RefCountedThreadSafe<SafeBrowsingService>,
+ : public base::RefCountedThreadSafe<SafeBrowsingService,
+ BrowserThread::DeleteOnUIThread>,
public content::NotificationObserver {
public:
class Client;
@@ -267,6 +269,8 @@ class SafeBrowsingService
return csd_service_.get();
}
+ // The DownloadProtectionService is not valid after the SafeBrowsingService
+ // is destroyed.
safe_browsing::DownloadProtectionService*
download_protection_service() const {
return download_service_.get();
@@ -325,7 +329,8 @@ class SafeBrowsingService
base::TimeTicks start; // When check was queued.
};
- friend class base::RefCountedThreadSafe<SafeBrowsingService>;
+ friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>;
+ friend class DeleteTask<SafeBrowsingService>;
friend class SafeBrowsingServiceTest;
// Called to initialize objects that are used on the io_thread.
@@ -556,7 +561,7 @@ class SafeBrowsingService
// The DownloadProtectionService is managed by the SafeBrowsingService,
// since its running state and lifecycle depends on SafeBrowsingService's.
- scoped_refptr<safe_browsing::DownloadProtectionService> download_service_;
+ scoped_ptr<safe_browsing::DownloadProtectionService> download_service_;
DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService);
};

Powered by Google App Engine
This is Rietveld 408576698