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

Side by Side Diff: components/security_interstitials/core/controller_client.cc

Issue 2955503002: Make interstitial links open in a new tab (Closed)
Patch Set: Rebase CL 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/controller_client.h" 5 #include "components/security_interstitials/core/controller_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "components/google/core/browser/google_util.h" 9 #include "components/google/core/browser/google_util.h"
10 #include "components/prefs/pref_service.h" 10 #include "components/prefs/pref_service.h"
(...skipping 27 matching lines...) Expand all
38 metrics_helper_->RecordUserInteraction( 38 metrics_helper_->RecordUserInteraction(
39 report ? MetricsHelper::SET_EXTENDED_REPORTING_ENABLED 39 report ? MetricsHelper::SET_EXTENDED_REPORTING_ENABLED
40 : MetricsHelper::SET_EXTENDED_REPORTING_DISABLED); 40 : MetricsHelper::SET_EXTENDED_REPORTING_DISABLED);
41 } 41 }
42 42
43 void ControllerClient::OpenExtendedReportingPrivacyPolicy() { 43 void ControllerClient::OpenExtendedReportingPrivacyPolicy() {
44 metrics_helper_->RecordUserInteraction(MetricsHelper::SHOW_PRIVACY_POLICY); 44 metrics_helper_->RecordUserInteraction(MetricsHelper::SHOW_PRIVACY_POLICY);
45 GURL privacy_url(kSafeBrowsingPrivacyPolicyUrl); 45 GURL privacy_url(kSafeBrowsingPrivacyPolicyUrl);
46 privacy_url = 46 privacy_url =
47 google_util::AppendGoogleLocaleParam(privacy_url, GetApplicationLocale()); 47 google_util::AppendGoogleLocaleParam(privacy_url, GetApplicationLocale());
48 OpenUrlInCurrentTab(privacy_url); 48 OpenUrlInNewForegroundTab(privacy_url);
49 } 49 }
50 50
51 void ControllerClient::OpenExtendedReportingWhitepaper() { 51 void ControllerClient::OpenExtendedReportingWhitepaper() {
52 metrics_helper_->RecordUserInteraction(MetricsHelper::SHOW_WHITEPAPER); 52 metrics_helper_->RecordUserInteraction(MetricsHelper::SHOW_WHITEPAPER);
53 GURL whitepaper_url(kSafeBrowsingWhitePaperUrl); 53 GURL whitepaper_url(kSafeBrowsingWhitePaperUrl);
54 whitepaper_url = google_util::AppendGoogleLocaleParam(whitepaper_url, 54 whitepaper_url = google_util::AppendGoogleLocaleParam(whitepaper_url,
55 GetApplicationLocale()); 55 GetApplicationLocale());
56 OpenUrlInCurrentTab(whitepaper_url); 56 OpenUrlInNewForegroundTab(whitepaper_url);
57 } 57 }
58 58
59 } // namespace security_interstitials 59 } // namespace security_interstitials
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698