OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_ |
6 #define CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 | 10 |
11 class CannedBrowsingDataAppCacheHelper; | 11 class CannedBrowsingDataAppCacheHelper; |
12 class CannedBrowsingDataCookieHelper; | 12 class CannedBrowsingDataCookieHelper; |
13 class CannedBrowsingDataDatabaseHelper; | 13 class CannedBrowsingDataDatabaseHelper; |
14 class CannedBrowsingDataFileSystemHelper; | 14 class CannedBrowsingDataFileSystemHelper; |
15 class CannedBrowsingDataIndexedDBHelper; | 15 class CannedBrowsingDataIndexedDBHelper; |
16 class CannedBrowsingDataLocalStorageHelper; | 16 class CannedBrowsingDataLocalStorageHelper; |
17 class CannedBrowsingDataServerBoundCertHelper; | 17 class CannedBrowsingDataServerBoundCertHelper; |
18 class GURL; | |
18 class Profile; | 19 class Profile; |
19 | 20 |
20 class LocalSharedObjectsContainer { | 21 class LocalSharedObjectsContainer { |
21 public: | 22 public: |
22 explicit LocalSharedObjectsContainer(Profile* profile); | 23 explicit LocalSharedObjectsContainer(Profile* profile); |
23 ~LocalSharedObjectsContainer(); | 24 ~LocalSharedObjectsContainer(); |
24 | 25 |
25 // Empties the container. | 26 // Empties the container. |
26 void Reset(); | 27 void Reset(); |
27 | 28 |
28 // Returns true if the container is empty and contains no local shared | 29 // Returns the number of objects stored in the container. |
29 // objects. | 30 size_t Size() const; |
bauerb at google
2012/04/27 16:12:50
To keep the interface consistent, could you name t
markusheintz_
2012/05/10 16:32:36
Done.
| |
30 bool IsEmpty() const; | 31 |
32 // Returns the number of objects for the given |origin|. | |
33 size_t GetObjectCountForDomain(const GURL& url) const; | |
31 | 34 |
32 CannedBrowsingDataAppCacheHelper* appcaches() const { | 35 CannedBrowsingDataAppCacheHelper* appcaches() const { |
33 return appcaches_; | 36 return appcaches_; |
34 } | 37 } |
35 CannedBrowsingDataCookieHelper* cookies() const { | 38 CannedBrowsingDataCookieHelper* cookies() const { |
36 return cookies_; | 39 return cookies_; |
37 } | 40 } |
38 CannedBrowsingDataDatabaseHelper* databases() const { | 41 CannedBrowsingDataDatabaseHelper* databases() const { |
39 return databases_; | 42 return databases_; |
40 } | 43 } |
(...skipping 20 matching lines...) Expand all Loading... | |
61 scoped_refptr<CannedBrowsingDataFileSystemHelper> file_systems_; | 64 scoped_refptr<CannedBrowsingDataFileSystemHelper> file_systems_; |
62 scoped_refptr<CannedBrowsingDataIndexedDBHelper> indexed_dbs_; | 65 scoped_refptr<CannedBrowsingDataIndexedDBHelper> indexed_dbs_; |
63 scoped_refptr<CannedBrowsingDataLocalStorageHelper> local_storages_; | 66 scoped_refptr<CannedBrowsingDataLocalStorageHelper> local_storages_; |
64 scoped_refptr<CannedBrowsingDataServerBoundCertHelper> server_bound_certs_; | 67 scoped_refptr<CannedBrowsingDataServerBoundCertHelper> server_bound_certs_; |
65 scoped_refptr<CannedBrowsingDataLocalStorageHelper> session_storages_; | 68 scoped_refptr<CannedBrowsingDataLocalStorageHelper> session_storages_; |
66 | 69 |
67 DISALLOW_COPY_AND_ASSIGN(LocalSharedObjectsContainer); | 70 DISALLOW_COPY_AND_ASSIGN(LocalSharedObjectsContainer); |
68 }; | 71 }; |
69 | 72 |
70 #endif // CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_ | 73 #endif // CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_ |
OLD | NEW |