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 #include "chrome/browser/ui/gtk/collected_cookies_gtk.h" | 5 #include "chrome/browser/ui/gtk/collected_cookies_gtk.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" | 9 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" |
10 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" | 10 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 continue; | 481 continue; |
482 CookieTreeHostNode* host_node = static_cast<CookieTreeHostNode*>( | 482 CookieTreeHostNode* host_node = static_cast<CookieTreeHostNode*>( |
483 node); | 483 node); |
484 if (host_node->CanCreateContentException()) { | 484 if (host_node->CanCreateContentException()) { |
485 if (!last_domain_name.empty()) | 485 if (!last_domain_name.empty()) |
486 multiple_domains_added = true; | 486 multiple_domains_added = true; |
487 last_domain_name = host_node->GetTitle(); | 487 last_domain_name = host_node->GetTitle(); |
488 Profile* profile = | 488 Profile* profile = |
489 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); | 489 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); |
490 host_node->CreateContentException( | 490 host_node->CreateContentException( |
491 CookieSettings::Factory::GetForProfile(profile), setting); | 491 CookieSettings::Factory::GetForProfile(profile).get(), setting); |
492 } | 492 } |
493 } | 493 } |
494 g_list_foreach(paths, reinterpret_cast<GFunc>(gtk_tree_path_free), NULL); | 494 g_list_foreach(paths, reinterpret_cast<GFunc>(gtk_tree_path_free), NULL); |
495 g_list_free(paths); | 495 g_list_free(paths); |
496 if (last_domain_name.empty()) { | 496 if (last_domain_name.empty()) { |
497 gtk_widget_hide(infobar_); | 497 gtk_widget_hide(infobar_); |
498 } else { | 498 } else { |
499 gtk_label_set_text( | 499 gtk_label_set_text( |
500 GTK_LABEL(infobar_label_), GetInfobarLabel( | 500 GTK_LABEL(infobar_label_), GetInfobarLabel( |
501 setting, multiple_domains_added, last_domain_name).c_str()); | 501 setting, multiple_domains_added, last_domain_name).c_str()); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 } | 538 } |
539 | 539 |
540 void CollectedCookiesGtk::OnTreeViewSelectionChange(GtkWidget* selection) { | 540 void CollectedCookiesGtk::OnTreeViewSelectionChange(GtkWidget* selection) { |
541 EnableControls(); | 541 EnableControls(); |
542 ShowCookieInfo(gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook_))); | 542 ShowCookieInfo(gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook_))); |
543 } | 543 } |
544 | 544 |
545 void CollectedCookiesGtk::OnDestroy(GtkWidget* widget) { | 545 void CollectedCookiesGtk::OnDestroy(GtkWidget* widget) { |
546 delete this; | 546 delete this; |
547 } | 547 } |
OLD | NEW |