#include "chrome/browser/browsing_data/browsing_data_database_helper.h"
#include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h"
#include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h"
-#include "webkit/browser/appcache/appcache_service.h"
+#include "chrome/browser/browsing_data/browsing_data_service_worker_helper.h"
+#include "content/public/browser/appcache_service.h"
class CookieTreeNode;
// cookie tree.
kCocoaCookieDetailsTypeTreeIndexedDB,
+ // Detailed information about a Service Worker used for display in the
+ // cookie tree.
+ kCocoaCookieDetailsTypeTreeServiceWorker,
+
// Detailed information about a web database used for display
// in the cookie prompt dialog.
kCocoaCookieDetailsTypePromptDatabase,
// Only set for type kCocoaCookieDetailsTypeTreeLocalStorage,
// kCocoaCookieDetailsTypeTreeDatabase,
// kCocoaCookieDetailsTypePromptDatabase,
- // kCocoaCookieDetailsTypeTreeIndexedDB, and
+ // kCocoaCookieDetailsTypeTreeIndexedDB,
+ // kCocoaCookieDetailsTypeTreeServiceWorker, and
// kCocoaCookieDetailsTypeTreeAppCache nodes.
base::scoped_nsobject<NSString> fileSize_;
// Only set for types kCocoaCookieDetailsTypeTreeLocalStorage,
- // kCocoaCookieDetailsTypeTreeDatabase, and
+ // kCocoaCookieDetailsTypeTreeDatabase,
+ // kCocoaCookieDetailsTypeTreeServiceWorker, and
// kCocoaCookieDetailsTypeTreeIndexedDB nodes.
base::scoped_nsobject<NSString> lastModified_;
// Only set for type kCocoaCookieDetailsTypeCookie,
// kCocoaCookieDetailsTypePromptDatabase,
- // kCocoaCookieDetailsTypePromptLocalStorage, and
+ // kCocoaCookieDetailsTypePromptLocalStorage,
+ // kCocoaCookieDetailsTypePromptServiceWorker, and
// kCocoaCookieDetailsTypeTreeIndexedDB nodes.
base::scoped_nsobject<NSString> domain_;
// Only set for type kCocoaCookieDetailsTypeTreeAppCache and
// kCocoaCookieDetailsTypePromptAppCache.
base::scoped_nsobject<NSString> manifestURL_;
+
+ // Only set for type kCocoaCookieDetailsTypeTreeServiceWorker nodes.
+ base::scoped_nsobject<NSString> scopes_;
}
@property(nonatomic, readonly) BOOL canEditExpiration;
- (BOOL)shouldShowAppCachePromptDetailsView;
- (BOOL)shouldShowAppCacheTreeDetailsView;
- (BOOL)shouldShowIndexedDBTreeDetailsView;
+- (BOOL)shouldShowServiceWorkerTreeDetailsView;
- (NSString*)name;
- (NSString*)content;
- (NSString*)localStorageKey;
- (NSString*)localStorageValue;
- (NSString*)manifestURL;
+- (NSString*)scopes;
// Used for folders in the cookie tree.
- (id)initAsFolder;
// -initWithAppCacheInfo: creates a cookie details with the manifest URL plus
// all of this additional information that is available after an appcache is
// actually created, including its creation date, size and last accessed time.
-- (id)initWithAppCacheInfo:(const appcache::AppCacheInfo*)appcacheInfo;
+- (id)initWithAppCacheInfo:(const content::AppCacheInfo*)appcacheInfo;
// Used for local storage details in the cookie prompt dialog.
- (id)initWithLocalStorage:(const std::string&)domain
- (id)initWithIndexedDBInfo:
(const content::IndexedDBInfo*)indexedDB;
+// Used for ServiceWorker details in the cookie tree.
+- (id)initWithServiceWorkerUsageInfo:
+ (const content::ServiceWorkerUsageInfo*)serviceWorker;
+
// A factory method to create a configured instance given a node from
// the cookie tree in |treeNode|.
+ (CocoaCookieDetails*)createFromCookieTreeNode:(CookieTreeNode*)treeNode;