| 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/views/website_settings/website_settings_popup_view.h
" | 5 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h
" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 presenter_->OnUIClosing(); | 380 presenter_->OnUIClosing(); |
| 381 } | 381 } |
| 382 | 382 |
| 383 void WebsiteSettingsPopupView::ButtonPressed(views::Button* button, | 383 void WebsiteSettingsPopupView::ButtonPressed(views::Button* button, |
| 384 const ui::Event& event) { | 384 const ui::Event& event) { |
| 385 if (button == reset_decisions_button_) { | 385 if (button == reset_decisions_button_) { |
| 386 ChromeSSLHostStateDelegate* delegate = | 386 ChromeSSLHostStateDelegate* delegate = |
| 387 presenter_->chrome_ssl_host_state_delegate(); | 387 presenter_->chrome_ssl_host_state_delegate(); |
| 388 DCHECK(delegate); | 388 DCHECK(delegate); |
| 389 delegate->RevokeUserDecisionsHard(presenter_->site_url().host()); | 389 delegate->RevokeUserDecisionsHard(presenter_->site_url().host()); |
| 390 GetWidget()->Close(); | |
| 391 } | 390 } |
| 391 GetWidget()->Close(); |
| 392 } | 392 } |
| 393 | 393 |
| 394 void WebsiteSettingsPopupView::LinkClicked(views::Link* source, | 394 void WebsiteSettingsPopupView::LinkClicked(views::Link* source, |
| 395 int event_flags) { | 395 int event_flags) { |
| 396 if (source == cookie_dialog_link_) { | 396 if (source == cookie_dialog_link_) { |
| 397 // Count how often the Collected Cookies dialog is opened. | 397 // Count how often the Collected Cookies dialog is opened. |
| 398 content::RecordAction( | 398 content::RecordAction( |
| 399 base::UserMetricsAction("WebsiteSettings_CookiesDialogOpened")); | 399 base::UserMetricsAction("WebsiteSettings_CookiesDialogOpened")); |
| 400 new CollectedCookiesViews(web_contents_); | 400 new CollectedCookiesViews(web_contents_); |
| 401 } else if (source == certificate_dialog_link_) { | 401 } else if (source == certificate_dialog_link_) { |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 | 812 |
| 813 if (reset_decisions_button) { | 813 if (reset_decisions_button) { |
| 814 content_layout->StartRow(1, 0); | 814 content_layout->StartRow(1, 0); |
| 815 content_layout->AddView(reset_decisions_button); | 815 content_layout->AddView(reset_decisions_button); |
| 816 } | 816 } |
| 817 | 817 |
| 818 layout->AddView(content_pane, 1, 1, views::GridLayout::LEADING, | 818 layout->AddView(content_pane, 1, 1, views::GridLayout::LEADING, |
| 819 views::GridLayout::LEADING); | 819 views::GridLayout::LEADING); |
| 820 layout->AddPaddingRow(0, kConnectionSectionPaddingBottom); | 820 layout->AddPaddingRow(0, kConnectionSectionPaddingBottom); |
| 821 } | 821 } |
| OLD | NEW |