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

Side by Side Diff: chrome/browser/gtk/collected_cookies_gtk.cc

Issue 3033017: Merge 53186 - Before creating a content setting, check that you actually *can... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/browser/gtk/collected_cookies_gtk.h" 5 #include "chrome/browser/gtk/collected_cookies_gtk.h"
6 6
7 #include "app/gtk_util.h" 7 #include "app/gtk_util.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "chrome/browser/cookies_tree_model.h" 9 #include "chrome/browser/cookies_tree_model.h"
10 #include "chrome/browser/gtk/gtk_util.h" 10 #include "chrome/browser/gtk/gtk_util.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 ContentSetting setting) { 259 ContentSetting setting) {
260 GtkTreeModel* model; 260 GtkTreeModel* model;
261 GList* paths = 261 GList* paths =
262 gtk_tree_selection_get_selected_rows(selection, &model); 262 gtk_tree_selection_get_selected_rows(selection, &model);
263 for (GList* item = paths; item; item = item->next) { 263 for (GList* item = paths; item; item = item->next) {
264 GtkTreeIter iter; 264 GtkTreeIter iter;
265 gtk_tree_model_get_iter( 265 gtk_tree_model_get_iter(
266 model, &iter, reinterpret_cast<GtkTreePath*>(item->data)); 266 model, &iter, reinterpret_cast<GtkTreePath*>(item->data));
267 CookieTreeOriginNode* node = static_cast<CookieTreeOriginNode*>( 267 CookieTreeOriginNode* node = static_cast<CookieTreeOriginNode*>(
268 adapter->GetNode(&iter)); 268 adapter->GetNode(&iter));
269 if (!node->CanCreateContentException()) { 269 if (node->CanCreateContentException()) {
270 node->CreateContentException( 270 node->CreateContentException(
271 tab_contents_->profile()->GetHostContentSettingsMap(), setting); 271 tab_contents_->profile()->GetHostContentSettingsMap(), setting);
272 } 272 }
273 } 273 }
274 g_list_foreach(paths, reinterpret_cast<GFunc>(gtk_tree_path_free), NULL); 274 g_list_foreach(paths, reinterpret_cast<GFunc>(gtk_tree_path_free), NULL);
275 g_list_free(paths); 275 g_list_free(paths);
276 } 276 }
277 277
278 void CollectedCookiesGtk::OnBlockAllowedButtonClicked(GtkWidget* button) { 278 void CollectedCookiesGtk::OnBlockAllowedButtonClicked(GtkWidget* button) {
279 AddExceptions(allowed_selection_, allowed_cookies_tree_adapter_.get(), 279 AddExceptions(allowed_selection_, allowed_cookies_tree_adapter_.get(),
(...skipping 17 matching lines...) Expand all
297 g_signal_handlers_block_by_func( 297 g_signal_handlers_block_by_func(
298 tree_view, reinterpret_cast<gpointer>(OnTreeViewRowExpandedThunk), this); 298 tree_view, reinterpret_cast<gpointer>(OnTreeViewRowExpandedThunk), this);
299 gtk_tree_view_expand_row(GTK_TREE_VIEW(tree_view), path, TRUE); 299 gtk_tree_view_expand_row(GTK_TREE_VIEW(tree_view), path, TRUE);
300 g_signal_handlers_unblock_by_func( 300 g_signal_handlers_unblock_by_func(
301 tree_view, reinterpret_cast<gpointer>(OnTreeViewRowExpandedThunk), this); 301 tree_view, reinterpret_cast<gpointer>(OnTreeViewRowExpandedThunk), this);
302 } 302 }
303 303
304 void CollectedCookiesGtk::OnTreeViewSelectionChange(GtkWidget* selection) { 304 void CollectedCookiesGtk::OnTreeViewSelectionChange(GtkWidget* selection) {
305 EnableControls(); 305 EnableControls();
306 } 306 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698