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

Unified Diff: chrome/browser/notifications/notifications_prefs_cache.h

Issue 1578023: Add notifications to allow desktop notification permissions to be synced. (Closed)
Patch Set: pre-commit Created 10 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: chrome/browser/notifications/notifications_prefs_cache.h
diff --git a/chrome/browser/notifications/notifications_prefs_cache.h b/chrome/browser/notifications/notifications_prefs_cache.h
index de00774a7b9113b607058c27cfe5dc3736c29f87..1b87a29f05157a6a76142be3f331370cd8d71450 100644
--- a/chrome/browser/notifications/notifications_prefs_cache.h
+++ b/chrome/browser/notifications/notifications_prefs_cache.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATIONS_PREFS_CACHE_H_
#include <set>
+#include <vector>
#include "base/ref_counted.h"
#include "googleurl/src/gurl.h"
@@ -19,7 +20,7 @@ class ListValue;
class NotificationsPrefsCache
: public base::RefCountedThreadSafe<NotificationsPrefsCache> {
public:
- NotificationsPrefsCache(const ListValue* allowed, const ListValue* denied);
+ NotificationsPrefsCache();
void set_is_initialized(bool val) { is_initialized_ = val; }
bool is_initialized() { return is_initialized_; }
@@ -33,6 +34,14 @@ class NotificationsPrefsCache
void CacheAllowedOrigin(const GURL& origin);
void CacheDeniedOrigin(const GURL& origin);
+ // Set the cache to the supplied values. This clears the current
+ // contents of the cache.
+ void SetCacheAllowedOrigins(const std::vector<GURL>& allowed);
+ void SetCacheDeniedOrigins(const std::vector<GURL>& denied);
+
+ static void ListValueToGurlVector(const ListValue& origin_list,
+ std::vector<GURL>* origin_vector);
+
private:
friend class base::RefCountedThreadSafe<NotificationsPrefsCache>;

Powered by Google App Engine
This is Rietveld 408576698