Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: chrome/browser/content_settings/local_shared_objects_container.h

Issue 588583002: LocalSharedObjectsContainer: Separate object counting in an interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just rebased Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/content_settings/local_shared_objects_container.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/content_settings/local_shared_objects_counter.h"
10 11
11 class CannedBrowsingDataAppCacheHelper; 12 class CannedBrowsingDataAppCacheHelper;
12 class CannedBrowsingDataChannelIDHelper; 13 class CannedBrowsingDataChannelIDHelper;
13 class CannedBrowsingDataCookieHelper; 14 class CannedBrowsingDataCookieHelper;
14 class CannedBrowsingDataDatabaseHelper; 15 class CannedBrowsingDataDatabaseHelper;
15 class CannedBrowsingDataFileSystemHelper; 16 class CannedBrowsingDataFileSystemHelper;
16 class CannedBrowsingDataIndexedDBHelper; 17 class CannedBrowsingDataIndexedDBHelper;
17 class CannedBrowsingDataLocalStorageHelper; 18 class CannedBrowsingDataLocalStorageHelper;
18 class CannedBrowsingDataServiceWorkerHelper; 19 class CannedBrowsingDataServiceWorkerHelper;
19 class CookiesTreeModel; 20 class CookiesTreeModel;
20 class GURL;
21 class Profile; 21 class Profile;
22 22
23 class LocalSharedObjectsContainer { 23 class LocalSharedObjectsContainer : public LocalSharedObjectsCounter {
24 public: 24 public:
25 explicit LocalSharedObjectsContainer(Profile* profile); 25 explicit LocalSharedObjectsContainer(Profile* profile);
26 ~LocalSharedObjectsContainer(); 26 virtual ~LocalSharedObjectsContainer();
27
28 // LocalSharedObjectsCounter:
29 virtual size_t GetObjectCount() const OVERRIDE;
30 virtual size_t GetObjectCountForDomain(const GURL& url) const OVERRIDE;
27 31
28 // Empties the container. 32 // Empties the container.
29 void Reset(); 33 void Reset();
30 34
31 // Returns the number of objects stored in the container.
32 size_t GetObjectCount() const;
33
34 // Returns the number of objects for the given |origin|.
35 size_t GetObjectCountForDomain(const GURL& url) const;
36
37 // Creates a new CookiesTreeModel for all objects in the container, 35 // Creates a new CookiesTreeModel for all objects in the container,
38 // copying each of them. 36 // copying each of them.
39 scoped_ptr<CookiesTreeModel> CreateCookiesTreeModel() const; 37 scoped_ptr<CookiesTreeModel> CreateCookiesTreeModel() const;
40 38
41 CannedBrowsingDataAppCacheHelper* appcaches() const { 39 CannedBrowsingDataAppCacheHelper* appcaches() const {
42 return appcaches_.get(); 40 return appcaches_.get();
43 } 41 }
44 CannedBrowsingDataChannelIDHelper* channel_ids() const { 42 CannedBrowsingDataChannelIDHelper* channel_ids() const {
45 return channel_ids_.get(); 43 return channel_ids_.get();
46 } 44 }
(...skipping 25 matching lines...) Expand all
72 scoped_refptr<CannedBrowsingDataFileSystemHelper> file_systems_; 70 scoped_refptr<CannedBrowsingDataFileSystemHelper> file_systems_;
73 scoped_refptr<CannedBrowsingDataIndexedDBHelper> indexed_dbs_; 71 scoped_refptr<CannedBrowsingDataIndexedDBHelper> indexed_dbs_;
74 scoped_refptr<CannedBrowsingDataLocalStorageHelper> local_storages_; 72 scoped_refptr<CannedBrowsingDataLocalStorageHelper> local_storages_;
75 scoped_refptr<CannedBrowsingDataServiceWorkerHelper> service_workers_; 73 scoped_refptr<CannedBrowsingDataServiceWorkerHelper> service_workers_;
76 scoped_refptr<CannedBrowsingDataLocalStorageHelper> session_storages_; 74 scoped_refptr<CannedBrowsingDataLocalStorageHelper> session_storages_;
77 75
78 DISALLOW_COPY_AND_ASSIGN(LocalSharedObjectsContainer); 76 DISALLOW_COPY_AND_ASSIGN(LocalSharedObjectsContainer);
79 }; 77 };
80 78
81 #endif // CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_ 79 #endif // CHROME_BROWSER_CONTENT_SETTINGS_LOCAL_SHARED_OBJECTS_CONTAINER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/content_settings/local_shared_objects_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698