From 5a6a80d03a239f21af8afb6cf96bb05fc5fac10c Mon Sep 17 00:00:00 2001 From: "Marshall T. Rose" Date: Mon, 21 Jan 2019 09:14:34 -0500 Subject: [PATCH 1/2] Update ads_impl.cc --- src/ads_impl.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ads_impl.cc b/src/ads_impl.cc index 81c4018..d5b2bd9 100644 --- a/src/ads_impl.cc +++ b/src/ads_impl.cc @@ -390,10 +390,11 @@ void AdsImpl::ClassifyPage(const std::string& url, const std::string& html) { auto winner_over_time_category = GetWinnerOverTimeCategory(); LOG(INFO) << "Site visited " << url << ", immediateWinner is " - << winning_category << " and winnerOverTime is " - << winner_over_time_category; + << winning_category << " and winnerOverTime is " + << winner_over_time_category << "previous tab url " + << last_shown_tab_url_; - if (last_shown_tab_url_ == url) { + if (url.compare(last_shown_tab_url_) == 0) { LoadInfo load_info; load_info.tab_id = last_shown_tab_id_; load_info.tab_url = last_shown_tab_url_; From cc234915ccfceb2ed5a227e3adb6d352063bde29 Mon Sep 17 00:00:00 2001 From: "Marshall T. Rose" Date: Mon, 21 Jan 2019 11:37:29 -0500 Subject: [PATCH 2/2] Update ads_impl.cc to reflect comments from review --- src/ads_impl.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ads_impl.cc b/src/ads_impl.cc index d5b2bd9..0fff9a0 100644 --- a/src/ads_impl.cc +++ b/src/ads_impl.cc @@ -390,11 +390,11 @@ void AdsImpl::ClassifyPage(const std::string& url, const std::string& html) { auto winner_over_time_category = GetWinnerOverTimeCategory(); LOG(INFO) << "Site visited " << url << ", immediateWinner is " - << winning_category << " and winnerOverTime is " - << winner_over_time_category << "previous tab url " - << last_shown_tab_url_; + << winning_category << " and winnerOverTime is " + << winner_over_time_category << "previous tab url " + << last_shown_tab_url_; - if (url.compare(last_shown_tab_url_) == 0) { + if (last_shown_tab_url_ == url) { LoadInfo load_info; load_info.tab_id = last_shown_tab_id_; load_info.tab_url = last_shown_tab_url_;