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

Side by Side Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc

Issue 1017683003: Don't open the Collected Cookies dialog if the related web contents is null because the tab was alr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« 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) 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 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 views::GridLayout::LEADING); 839 views::GridLayout::LEADING);
840 layout->AddPaddingRow(0, kConnectionSectionPaddingBottom); 840 layout->AddPaddingRow(0, kConnectionSectionPaddingBottom);
841 } 841 }
842 842
843 void WebsiteSettingsPopupView::HandleLinkClickedAsync(views::Link* source) { 843 void WebsiteSettingsPopupView::HandleLinkClickedAsync(views::Link* source) {
844 if (source == cookie_dialog_link_) { 844 if (source == cookie_dialog_link_) {
845 // Count how often the Collected Cookies dialog is opened. 845 // Count how often the Collected Cookies dialog is opened.
846 presenter_->RecordWebsiteSettingsAction( 846 presenter_->RecordWebsiteSettingsAction(
847 WebsiteSettings::WEBSITE_SETTINGS_COOKIES_DIALOG_OPENED); 847 WebsiteSettings::WEBSITE_SETTINGS_COOKIES_DIALOG_OPENED);
848 848
849 new CollectedCookiesViews(web_contents_); 849 if (web_contents_ != NULL)
850 new CollectedCookiesViews(web_contents_);
850 } else if (source == certificate_dialog_link_) { 851 } else if (source == certificate_dialog_link_) {
851 gfx::NativeWindow parent = GetAnchorView() ? 852 gfx::NativeWindow parent = GetAnchorView() ?
852 GetAnchorView()->GetWidget()->GetNativeWindow() : nullptr; 853 GetAnchorView()->GetWidget()->GetNativeWindow() : nullptr;
853 presenter_->RecordWebsiteSettingsAction( 854 presenter_->RecordWebsiteSettingsAction(
854 WebsiteSettings::WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED); 855 WebsiteSettings::WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED);
855 ShowCertificateViewerByID(web_contents_, parent, cert_id_); 856 ShowCertificateViewerByID(web_contents_, parent, cert_id_);
856 } else if (source == signed_certificate_timestamps_link_) { 857 } else if (source == signed_certificate_timestamps_link_) {
857 chrome::ShowSignedCertificateTimestampsViewer( 858 chrome::ShowSignedCertificateTimestampsViewer(
858 web_contents_, signed_certificate_timestamp_ids_); 859 web_contents_, signed_certificate_timestamp_ids_);
859 presenter_->RecordWebsiteSettingsAction( 860 presenter_->RecordWebsiteSettingsAction(
(...skipping 14 matching lines...) Expand all
874 // desktop we should link to that here, too. 875 // desktop we should link to that here, too.
875 browser_->OpenURL(content::OpenURLParams( 876 browser_->OpenURL(content::OpenURLParams(
876 GURL(chrome::kChromeUIContentSettingsURL), content::Referrer(), 877 GURL(chrome::kChromeUIContentSettingsURL), content::Referrer(),
877 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false)); 878 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false));
878 presenter_->RecordWebsiteSettingsAction( 879 presenter_->RecordWebsiteSettingsAction(
879 WebsiteSettings::WEBSITE_SETTINGS_SITE_SETTINGS_OPENED); 880 WebsiteSettings::WEBSITE_SETTINGS_SITE_SETTINGS_OPENED);
880 } else { 881 } else {
881 NOTREACHED(); 882 NOTREACHED();
882 } 883 }
883 } 884 }
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