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

Side by Side Diff: components/security_interstitials/content/security_interstitial_page.cc

Issue 2955503002: Make interstitial links open in a new tab (Closed)
Patch Set: Fix compilation error Created 3 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 "components/security_interstitials/content/security_interstitial_page.h " 5 #include "components/security_interstitials/content/security_interstitial_page.h "
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 on_show_extended_reporting_pref_exists_ = 81 on_show_extended_reporting_pref_exists_ =
82 safe_browsing::ExtendedReportingPrefExists(*prefs); 82 safe_browsing::ExtendedReportingPrefExists(*prefs);
83 on_show_extended_reporting_pref_value_ = 83 on_show_extended_reporting_pref_value_ =
84 safe_browsing::IsExtendedReportingEnabled(*prefs); 84 safe_browsing::IsExtendedReportingEnabled(*prefs);
85 } 85 }
86 86
87 controller_->set_interstitial_page(interstitial_page_); 87 controller_->set_interstitial_page(interstitial_page_);
88 AfterShow(); 88 AfterShow();
89 } 89 }
90 90
91 SecurityInterstitialControllerClient* SecurityInterstitialPage::controller() { 91 SecurityInterstitialControllerClient* SecurityInterstitialPage::controller()
92 const {
92 return controller_.get(); 93 return controller_.get();
93 } 94 }
94 95
95 void SecurityInterstitialPage::UpdateMetricsAfterSecurityInterstitial() { 96 void SecurityInterstitialPage::UpdateMetricsAfterSecurityInterstitial() {
96 if (controller_->GetPrefService()) { 97 if (controller_->GetPrefService()) {
97 safe_browsing::UpdateMetricsAfterSecurityInterstitial( 98 safe_browsing::UpdateMetricsAfterSecurityInterstitial(
98 *controller_->GetPrefService(), on_show_extended_reporting_pref_exists_, 99 *controller_->GetPrefService(), on_show_extended_reporting_pref_exists_,
99 on_show_extended_reporting_pref_value_); 100 on_show_extended_reporting_pref_value_);
100 } 101 }
101 } 102 }
(...skipping 13 matching lines...) Expand all
115 webui::SetLoadTimeDataDefaults( 116 webui::SetLoadTimeDataDefaults(
116 controller()->GetApplicationLocale(), &load_time_data); 117 controller()->GetApplicationLocale(), &load_time_data);
117 std::string html = ResourceBundle::GetSharedInstance() 118 std::string html = ResourceBundle::GetSharedInstance()
118 .GetRawDataResource(GetHTMLTemplateId()) 119 .GetRawDataResource(GetHTMLTemplateId())
119 .as_string(); 120 .as_string();
120 webui::AppendWebUiCssTextDefaults(&html); 121 webui::AppendWebUiCssTextDefaults(&html);
121 return webui::GetI18nTemplateHtml(html, &load_time_data); 122 return webui::GetI18nTemplateHtml(html, &load_time_data);
122 } 123 }
123 124
124 } // security_interstitials 125 } // security_interstitials
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698