Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge pull request #1493 from brave/fix-referral-headers-download #1498

Merged
merged 1 commit into from
Jan 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions components/brave_referrals/browser/brave_referrals_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ void BraveReferralsService::Start() {
base::Bind(&BraveReferralsService::GetFirstRunTime,
base::Unretained(this)));

// Periodically fetch referral headers.
// Fetch the referral headers on startup.
FetchReferralHeaders();

// Also, periodically fetch the referral headers.
DCHECK(!fetch_referral_headers_timer_);
fetch_referral_headers_timer_ = std::make_unique<base::RepeatingTimer>();
fetch_referral_headers_timer_->Start(
Expand All @@ -113,8 +116,6 @@ void BraveReferralsService::Start() {
base::Unretained(this)),
base::Bind(&BraveReferralsService::OnReadPromoCodeComplete,
weak_factory_.GetWeakPtr()));
else
FetchReferralHeaders();

initialized_ = true;
}
Expand Down