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

Unified Diff: components/security_interstitials/core/controller_client.cc

Issue 2303413002: Simplify security_interstitials::ControllerClient and other related classes (Closed)
Patch Set: Jialiu comments Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/security_interstitials/core/controller_client.cc
diff --git a/components/security_interstitials/core/controller_client.cc b/components/security_interstitials/core/controller_client.cc
index 1bf60bab51090cec9f529aa44f048f1db8215755..e38fc18dd7958258a364567ee0b554b5505e6c27 100644
--- a/components/security_interstitials/core/controller_client.cc
+++ b/components/security_interstitials/core/controller_client.cc
@@ -22,18 +22,16 @@ const char kPrivacyLinkHtml[] =
"<a id=\"privacy-link\" href=\"\" onclick=\"sendCommand(%d); "
"return false;\" onmousedown=\"return false;\">%s</a>";
-ControllerClient::ControllerClient() {}
+ControllerClient::ControllerClient(
+ std::unique_ptr<MetricsHelper> metrics_helper)
+ : metrics_helper_(std::move(metrics_helper)) {}
+
ControllerClient::~ControllerClient() {}
MetricsHelper* ControllerClient::metrics_helper() const {
return metrics_helper_.get();
}
-void ControllerClient::set_metrics_helper(
- std::unique_ptr<MetricsHelper> metrics_helper) {
- metrics_helper_ = std::move(metrics_helper);
-}
-
void ControllerClient::SetReportingPreference(bool report) {
GetPrefService()->SetBoolean(GetExtendedReportingPrefName(), report);
metrics_helper_->RecordUserInteraction(

Powered by Google App Engine
This is Rietveld 408576698