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

Side by Side Diff: components/security_interstitials/core/superfish_error_ui.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/core/superfish_error_ui.h" 5 #include "components/security_interstitials/core/superfish_error_ui.h"
6 6
7 #include "components/security_interstitials/core/common_string_util.h" 7 #include "components/security_interstitials/core/common_string_util.h"
8 #include "components/security_interstitials/core/controller_client.h" 8 #include "components/security_interstitials/core/controller_client.h"
9 #include "components/security_interstitials/core/metrics_helper.h" 9 #include "components/security_interstitials/core/metrics_helper.h"
10 #include "components/strings/grit/components_strings.h" 10 #include "components/strings/grit/components_strings.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 load_time_data->SetString("finalParagraph", std::string()); 58 load_time_data->SetString("finalParagraph", std::string());
59 load_time_data->SetString("openDetails", base::string16()); 59 load_time_data->SetString("openDetails", base::string16());
60 load_time_data->SetString("closeDetails", base::string16()); 60 load_time_data->SetString("closeDetails", base::string16());
61 } 61 }
62 62
63 void SuperfishErrorUI::HandleCommand(SecurityInterstitialCommands command) { 63 void SuperfishErrorUI::HandleCommand(SecurityInterstitialCommands command) {
64 // Override the Help Center link to point to a Superfish-specific page. 64 // Override the Help Center link to point to a Superfish-specific page.
65 if (command == CMD_OPEN_HELP_CENTER) { 65 if (command == CMD_OPEN_HELP_CENTER) {
66 controller()->metrics_helper()->RecordUserInteraction( 66 controller()->metrics_helper()->RecordUserInteraction(
67 security_interstitials::MetricsHelper::SHOW_LEARN_MORE); 67 security_interstitials::MetricsHelper::SHOW_LEARN_MORE);
68 controller()->OpenUrlInCurrentTab(GURL(kHelpURL)); 68 controller()->OpenUrlInNewForegroundTab(GURL(kHelpURL));
69 return; 69 return;
70 } 70 }
71 SSLErrorUI::HandleCommand(command); 71 SSLErrorUI::HandleCommand(command);
72 } 72 }
73 73
74 } // namespace security_interstitials 74 } // namespace security_interstitials
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698