Revert 168224 - Update V8 to version 3.15.4.
[chromium-blink-merge.git] / chrome / browser / content_settings / local_shared_objects_container.h
blob0bdd9a9ccdce57b58c36b8c2446c5a048b31cdb6
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
11 class CannedBrowsingDataAppCacheHelper;
12 class CannedBrowsingDataCookieHelper;
13 class CannedBrowsingDataDatabaseHelper;
14 class CannedBrowsingDataFileSystemHelper;
15 class CannedBrowsingDataIndexedDBHelper;
16 class CannedBrowsingDataLocalStorageHelper;
17 class CannedBrowsingDataServerBoundCertHelper;
18 class CookiesTreeModel;
19 class GURL;
20 class Profile;
22 class LocalSharedObjectsContainer {
23 public:
24 explicit LocalSharedObjectsContainer(Profile* profile);
25 ~LocalSharedObjectsContainer();
27 // Empties the container.
28 void Reset();
30 // Returns the number of objects stored in the container.
31 size_t GetObjectCount() const;
33 // Returns the number of objects for the given |origin|.
34 size_t GetObjectCountForDomain(const GURL& url) const;
36 // Creates a new CookiesTreeModel for all objects in the container,
37 // copying each of them.
38 scoped_ptr<CookiesTreeModel> CreateCookiesTreeModel() const;
40 CannedBrowsingDataAppCacheHelper* appcaches() const {
41 return appcaches_;
43 CannedBrowsingDataCookieHelper* cookies() const {
44 return cookies_;
46 CannedBrowsingDataDatabaseHelper* databases() const {
47 return databases_;
49 CannedBrowsingDataFileSystemHelper* file_systems() const {
50 return file_systems_;
52 CannedBrowsingDataIndexedDBHelper* indexed_dbs() const {
53 return indexed_dbs_;
55 CannedBrowsingDataLocalStorageHelper* local_storages() const {
56 return local_storages_;
58 CannedBrowsingDataServerBoundCertHelper* server_bound_certs() const {
59 return server_bound_certs_;
61 CannedBrowsingDataLocalStorageHelper* session_storages() const {
62 return session_storages_;
65 private:
66 scoped_refptr<CannedBrowsingDataAppCacheHelper> appcaches_;
67 scoped_refptr<CannedBrowsingDataCookieHelper> cookies_;
68 scoped_refptr<CannedBrowsingDataDatabaseHelper> databases_;
69 scoped_refptr<CannedBrowsingDataFileSystemHelper> file_systems_;
70 scoped_refptr<CannedBrowsingDataIndexedDBHelper> indexed_dbs_;
71 scoped_refptr<CannedBrowsingDataLocalStorageHelper> local_storages_;
72 scoped_refptr<CannedBrowsingDataServerBoundCertHelper> server_bound_certs_;
73 scoped_refptr<CannedBrowsingDataLocalStorageHelper> session_storages_;
75 DISALLOW_COPY_AND_ASSIGN(LocalSharedObjectsContainer);
78 #endif // CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_