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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.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, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/content_settings/tab_specific_content_settings.h
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.h b/chrome/browser/content_settings/tab_specific_content_settings.h
index b937fcd375937de9341082ddb1bc761727ba9c93..1948126ae763fc5ec33bf00db880477894180863 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.h
+++ b/chrome/browser/content_settings/tab_specific_content_settings.h
@@ -12,6 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "base/scoped_observer.h"
+#include "chrome/browser/browsing_data/cookies_tree_model.h"
#include "chrome/browser/content_settings/content_settings_usages_state.h"
#include "chrome/browser/content_settings/local_shared_objects_container.h"
#include "chrome/browser/media/media_stream_devices_controller.h"
@@ -24,7 +25,6 @@
#include "content/public/common/media_stream_request.h"
#include "net/cookies/canonical_cookie.h"
-class CookiesTreeModel;
class HostContentSettingsMap;
class Profile;
@@ -271,19 +271,27 @@ class TabSpecificContentSettings
return pending_protocol_handler_setting_;
}
-
- // Returns a pointer to the |LocalSharedObjectsContainer| that contains all
- // allowed local shared objects like cookies, local storage, ... .
- const LocalSharedObjectsContainer& allowed_local_shared_objects() const {
+ // Returns the |LocalSharedObjectsCounter| instances corresponding to all
+ // allowed, and blocked, respectively, local shared objects like cookies,
+ // local storage, ... .
+ const LocalSharedObjectsCounter& allowed_local_shared_objects() const {
return allowed_local_shared_objects_;
}
- // Returns a pointer to the |LocalSharedObjectsContainer| that contains all
- // blocked local shared objects like cookies, local storage, ... .
- const LocalSharedObjectsContainer& blocked_local_shared_objects() const {
+ const LocalSharedObjectsCounter& blocked_local_shared_objects() const {
return blocked_local_shared_objects_;
}
+ // Creates a new copy of a CookiesTreeModel for all allowed, and blocked,
+ // respectively, local shared objects.
+ scoped_ptr<CookiesTreeModel> CreateAllowedCookiesTreeModel() const {
+ return allowed_local_shared_objects_.CreateCookiesTreeModel();
+ }
+
+ scoped_ptr<CookiesTreeModel> CreateBlockedCookiesTreeModel() const {
+ return blocked_local_shared_objects_.CreateCookiesTreeModel();
+ }
+
bool load_plugins_link_enabled() { return load_plugins_link_enabled_; }
void set_load_plugins_link_enabled(bool enabled) {
load_plugins_link_enabled_ = enabled;

Powered by Google App Engine
This is Rietveld 408576698