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

Unified Diff: chrome/browser/ui/gtk/collected_cookies_gtk.cc

Issue 10709006: Show apps protecting local data in chrome://settings/cookies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: argh Created 8 years, 5 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
« no previous file with comments | « chrome/browser/ui/gtk/collected_cookies_gtk.h ('k') | chrome/browser/ui/views/collected_cookies_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/collected_cookies_gtk.cc
diff --git a/chrome/browser/ui/gtk/collected_cookies_gtk.cc b/chrome/browser/ui/gtk/collected_cookies_gtk.cc
index 166feb83c80d2d703a29c5238b94da0cd5b4fca2..d2946ca648f874c1429119766dda0755944088f7 100644
--- a/chrome/browser/ui/gtk/collected_cookies_gtk.cc
+++ b/chrome/browser/ui/gtk/collected_cookies_gtk.cc
@@ -226,7 +226,7 @@ GtkWidget* CollectedCookiesGtk::CreateAllowedPane() {
allowed_lsos.file_systems()->Clone(),
NULL,
allowed_lsos.server_bound_certs()->Clone());
- allowed_cookies_tree_model_.reset(new CookiesTreeModel(apps_map, true));
+ allowed_cookies_tree_model_.reset(new CookiesTreeModel(apps_map, NULL, true));
allowed_cookies_tree_adapter_.reset(
new gtk_tree::TreeAdapter(this, allowed_cookies_tree_model_.get()));
allowed_tree_ = gtk_tree_view_new_with_model(
@@ -317,7 +317,7 @@ GtkWidget* CollectedCookiesGtk::CreateBlockedPane() {
blocked_lsos.file_systems()->Clone(),
NULL,
blocked_lsos.server_bound_certs()->Clone());
- blocked_cookies_tree_model_.reset(new CookiesTreeModel(apps_map, true));
+ blocked_cookies_tree_model_.reset(new CookiesTreeModel(apps_map, NULL, true));
blocked_cookies_tree_adapter_.reset(
new gtk_tree::TreeAdapter(this, blocked_cookies_tree_model_.get()));
blocked_tree_ = gtk_tree_view_new_with_model(
@@ -427,13 +427,13 @@ void CollectedCookiesGtk::DeleteDelegate() {
delete this;
}
-bool CollectedCookiesGtk::SelectionContainsOriginNode(
+bool CollectedCookiesGtk::SelectionContainsHostNode(
GtkTreeSelection* selection, gtk_tree::TreeAdapter* adapter) {
// Check whether at least one "origin" node is selected.
GtkTreeModel* model;
GList* paths =
gtk_tree_selection_get_selected_rows(selection, &model);
- bool contains_origin_node = false;
+ bool contains_host_node = false;
for (GList* item = paths; item; item = item->next) {
GtkTreeIter iter;
gtk_tree_model_get_iter(
@@ -441,29 +441,29 @@ bool CollectedCookiesGtk::SelectionContainsOriginNode(
CookieTreeNode* node =
static_cast<CookieTreeNode*>(adapter->GetNode(&iter));
if (node->GetDetailedInfo().node_type !=
- CookieTreeNode::DetailedInfo::TYPE_ORIGIN)
+ CookieTreeNode::DetailedInfo::TYPE_HOST)
continue;
- CookieTreeOriginNode* origin_node = static_cast<CookieTreeOriginNode*>(
+ CookieTreeHostNode* host_node = static_cast<CookieTreeHostNode*>(
node);
- if (!origin_node->CanCreateContentException())
+ if (!host_node->CanCreateContentException())
continue;
- contains_origin_node = true;
+ contains_host_node = true;
}
g_list_foreach(paths, reinterpret_cast<GFunc>(gtk_tree_path_free), NULL);
g_list_free(paths);
- return contains_origin_node;
+ return contains_host_node;
}
void CollectedCookiesGtk::EnableControls() {
// Update button states.
bool enable_for_allowed_cookies =
- SelectionContainsOriginNode(allowed_selection_,
+ SelectionContainsHostNode(allowed_selection_,
allowed_cookies_tree_adapter_.get());
gtk_widget_set_sensitive(block_allowed_cookie_button_,
enable_for_allowed_cookies);
bool enable_for_blocked_cookies =
- SelectionContainsOriginNode(blocked_selection_,
+ SelectionContainsHostNode(blocked_selection_,
blocked_cookies_tree_adapter_.get());
gtk_widget_set_sensitive(allow_blocked_cookie_button_,
enable_for_blocked_cookies);
@@ -502,16 +502,16 @@ void CollectedCookiesGtk::AddExceptions(GtkTreeSelection* selection,
CookieTreeNode* node =
static_cast<CookieTreeNode*>(adapter->GetNode(&iter));
if (node->GetDetailedInfo().node_type !=
- CookieTreeNode::DetailedInfo::TYPE_ORIGIN)
+ CookieTreeNode::DetailedInfo::TYPE_HOST)
continue;
- CookieTreeOriginNode* origin_node = static_cast<CookieTreeOriginNode*>(
+ CookieTreeHostNode* host_node = static_cast<CookieTreeHostNode*>(
node);
- if (origin_node->CanCreateContentException()) {
+ if (host_node->CanCreateContentException()) {
if (!last_domain_name.empty())
multiple_domains_added = true;
- last_domain_name = origin_node->GetTitle();
+ last_domain_name = host_node->GetTitle();
Profile* profile = tab_contents_->profile();
- origin_node->CreateContentException(
+ host_node->CreateContentException(
CookieSettings::Factory::GetForProfile(profile), setting);
}
}
« no previous file with comments | « chrome/browser/ui/gtk/collected_cookies_gtk.h ('k') | chrome/browser/ui/views/collected_cookies_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698