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

Unified Diff: chrome/browser/web_resource/promo_resource_service.cc

Issue 10541054: Immediate notification if active promotion arrives (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment fix Created 8 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_resource/promo_resource_service.cc
diff --git a/chrome/browser/web_resource/promo_resource_service.cc b/chrome/browser/web_resource/promo_resource_service.cc
index fbdeab1e7eec2f62f481167bcfe7315f58fbffe7..25ef64cf04ce41e90c85a7b64f3501ee69181930 100644
--- a/chrome/browser/web_resource/promo_resource_service.cc
+++ b/chrome/browser/web_resource/promo_resource_service.cc
@@ -153,11 +153,12 @@ void PromoResourceService::ScheduleNotification(double promo_start,
if (ms_until_start > 0)
PostNotification(ms_until_start);
if (ms_until_end > 0) {
achuithb 2012/06/07 20:34:27 Maybe also add else here?
aruslan 2012/06/07 20:55:40 Done.
- PostNotification(ms_until_end);
if (ms_until_start <= 0) {
// Notify immediately if time is between start and end.
PostNotification(0);
}
+ // Schedule notification at the end of promotion.
achuithb 2012/06/07 20:34:27 Why not use an else block here? I think we are pro
aruslan 2012/06/07 20:55:40 We should call PostNotification twice -- once with
achuithb 2012/06/07 21:31:28 I see now, that PostNotification sets web_resource
+ PostNotification(ms_until_end);
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698