blob: 683ddbfa74e704670586bf30467aa861100a5be9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_
#define CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/content_settings/local_shared_objects_counter.h"
class CannedBrowsingDataAppCacheHelper;
class CannedBrowsingDataChannelIDHelper;
class CannedBrowsingDataCookieHelper;
class CannedBrowsingDataDatabaseHelper;
class CannedBrowsingDataFileSystemHelper;
class CannedBrowsingDataIndexedDBHelper;
class CannedBrowsingDataLocalStorageHelper;
class CannedBrowsingDataServiceWorkerHelper;
class CookiesTreeModel;
class Profile;
class LocalSharedObjectsContainer : public LocalSharedObjectsCounter {
public:
explicit LocalSharedObjectsContainer(Profile* profile);
virtual ~LocalSharedObjectsContainer();
// LocalSharedObjectsCounter:
virtual size_t GetObjectCount() const OVERRIDE;
virtual size_t GetObjectCountForDomain(const GURL& url) const OVERRIDE;
// Empties the container.
void Reset();
// Creates a new CookiesTreeModel for all objects in the container,
// copying each of them.
scoped_ptr<CookiesTreeModel> CreateCookiesTreeModel() const;
CannedBrowsingDataAppCacheHelper* appcaches() const {
return appcaches_.get();
}
CannedBrowsingDataChannelIDHelper* channel_ids() const {
return channel_ids_.get();
}
CannedBrowsingDataCookieHelper* cookies() const { return cookies_.get(); }
CannedBrowsingDataDatabaseHelper* databases() const {
return databases_.get();
}
CannedBrowsingDataFileSystemHelper* file_systems() const {
return file_systems_.get();
}
CannedBrowsingDataIndexedDBHelper* indexed_dbs() const {
return indexed_dbs_.get();
}
CannedBrowsingDataLocalStorageHelper* local_storages() const {
return local_storages_.get();
}
CannedBrowsingDataServiceWorkerHelper* service_workers() const {
return service_workers_.get();
}
CannedBrowsingDataLocalStorageHelper* session_storages() const {
return session_storages_.get();
}
private:
scoped_refptr<CannedBrowsingDataAppCacheHelper> appcaches_;
scoped_refptr<CannedBrowsingDataChannelIDHelper> channel_ids_;
scoped_refptr<CannedBrowsingDataCookieHelper> cookies_;
scoped_refptr<CannedBrowsingDataDatabaseHelper> databases_;
scoped_refptr<CannedBrowsingDataFileSystemHelper> file_systems_;
scoped_refptr<CannedBrowsingDataIndexedDBHelper> indexed_dbs_;
scoped_refptr<CannedBrowsingDataLocalStorageHelper> local_storages_;
scoped_refptr<CannedBrowsingDataServiceWorkerHelper> service_workers_;
scoped_refptr<CannedBrowsingDataLocalStorageHelper> session_storages_;
DISALLOW_COPY_AND_ASSIGN(LocalSharedObjectsContainer);
};
#endif // CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_
|