Chromium Code Reviews| 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 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 9 | 10 |
| 10 class CannedBrowsingDataAppCacheHelper; | 11 class CannedBrowsingDataAppCacheHelper; |
| 11 class CannedBrowsingDataCookieHelper; | 12 class CannedBrowsingDataCookieHelper; |
| 12 class CannedBrowsingDataDatabaseHelper; | 13 class CannedBrowsingDataDatabaseHelper; |
| 13 class CannedBrowsingDataFileSystemHelper; | 14 class CannedBrowsingDataFileSystemHelper; |
| 14 class CannedBrowsingDataIndexedDBHelper; | 15 class CannedBrowsingDataIndexedDBHelper; |
| 15 class CannedBrowsingDataLocalStorageHelper; | 16 class CannedBrowsingDataLocalStorageHelper; |
| 16 class CannedBrowsingDataServerBoundCertHelper; | 17 class CannedBrowsingDataServerBoundCertHelper; |
| 18 class CookiesTreeModel; | |
| 17 class GURL; | 19 class GURL; |
| 18 class Profile; | 20 class Profile; |
| 19 | 21 |
| 20 class LocalSharedObjectsContainer { | 22 class LocalSharedObjectsContainer { |
| 21 public: | 23 public: |
| 22 explicit LocalSharedObjectsContainer(Profile* profile); | 24 explicit LocalSharedObjectsContainer(Profile* profile); |
| 23 ~LocalSharedObjectsContainer(); | 25 ~LocalSharedObjectsContainer(); |
| 24 | 26 |
| 25 // Empties the container. | 27 // Empties the container. |
| 26 void Reset(); | 28 void Reset(); |
| 27 | 29 |
| 28 // Returns the number of objects stored in the container. | 30 // Returns the number of objects stored in the container. |
| 29 size_t GetObjectCount() const; | 31 size_t GetObjectCount() const; |
| 30 | 32 |
| 31 // Returns the number of objects for the given |origin|. | 33 // Returns the number of objects for the given |origin|. |
| 32 size_t GetObjectCountForDomain(const GURL& url) const; | 34 size_t GetObjectCountForDomain(const GURL& url) const; |
| 33 | 35 |
| 36 // Creates a new CookiesTreeModel for all objects in the container. | |
|
markusheintz_
2012/07/30 14:02:15
Could you mention that the objects are copied? Tha
Bernhard Bauer
2012/07/31 00:20:03
Done.
| |
| 37 scoped_ptr<CookiesTreeModel> CreateCookiesTreeModel() const; | |
| 38 | |
| 34 CannedBrowsingDataAppCacheHelper* appcaches() const { | 39 CannedBrowsingDataAppCacheHelper* appcaches() const { |
| 35 return appcaches_; | 40 return appcaches_; |
| 36 } | 41 } |
| 37 CannedBrowsingDataCookieHelper* cookies() const { | 42 CannedBrowsingDataCookieHelper* cookies() const { |
| 38 return cookies_; | 43 return cookies_; |
| 39 } | 44 } |
| 40 CannedBrowsingDataDatabaseHelper* databases() const { | 45 CannedBrowsingDataDatabaseHelper* databases() const { |
| 41 return databases_; | 46 return databases_; |
| 42 } | 47 } |
| 43 CannedBrowsingDataFileSystemHelper* file_systems() const { | 48 CannedBrowsingDataFileSystemHelper* file_systems() const { |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 63 scoped_refptr<CannedBrowsingDataFileSystemHelper> file_systems_; | 68 scoped_refptr<CannedBrowsingDataFileSystemHelper> file_systems_; |
| 64 scoped_refptr<CannedBrowsingDataIndexedDBHelper> indexed_dbs_; | 69 scoped_refptr<CannedBrowsingDataIndexedDBHelper> indexed_dbs_; |
| 65 scoped_refptr<CannedBrowsingDataLocalStorageHelper> local_storages_; | 70 scoped_refptr<CannedBrowsingDataLocalStorageHelper> local_storages_; |
| 66 scoped_refptr<CannedBrowsingDataServerBoundCertHelper> server_bound_certs_; | 71 scoped_refptr<CannedBrowsingDataServerBoundCertHelper> server_bound_certs_; |
| 67 scoped_refptr<CannedBrowsingDataLocalStorageHelper> session_storages_; | 72 scoped_refptr<CannedBrowsingDataLocalStorageHelper> session_storages_; |
| 68 | 73 |
| 69 DISALLOW_COPY_AND_ASSIGN(LocalSharedObjectsContainer); | 74 DISALLOW_COPY_AND_ASSIGN(LocalSharedObjectsContainer); |
| 70 }; | 75 }; |
| 71 | 76 |
| 72 #endif // CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_ | 77 #endif // CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_ |
| OLD | NEW |