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

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

Issue 7313003: Separate memory purger from safe browsing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
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 65b7ea2da13d3e3de58b0f13b0cd66c811f2eca6..5571f540e00cb7340907961c7a2e00a874c1400c 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -21,6 +21,8 @@
#include "base/task.h"
#include "base/time.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
+#include "content/common/notification_observer.h"
+#include "content/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
class MalwareDetails;
@@ -39,7 +41,8 @@ class URLRequestContextGetter;
// Construction needs to happen on the main thread.
class SafeBrowsingService
- : public base::RefCountedThreadSafe<SafeBrowsingService> {
+ : public base::RefCountedThreadSafe<SafeBrowsingService>,
+ public NotificationObserver {
public:
class Client;
// Users of this service implement this interface to be notified
@@ -410,6 +413,11 @@ class SafeBrowsingService
// Adds the given entry to the whitelist. Called on the UI thread.
void UpdateWhitelist(const UnsafeResource& resource);
+ // NotificationObserver override
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details) OVERRIDE;
+
// The factory used to instanciate a SafeBrowsingService object.
// Useful for tests, so they can provide their own implementation of
// SafeBrowsingService.
@@ -472,6 +480,8 @@ class SafeBrowsingService
// Similar to |download_urlcheck_timeout_ms_|, but for download hash checks.
int64 download_hashcheck_timeout_ms_;
+ NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService);
};

Powered by Google App Engine
This is Rietveld 408576698