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

Unified Diff: chrome/browser/extensions/api/alarms/alarm_manager.h

Issue 145353013: Do not reschedule all alarms when adding a new alarm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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: chrome/browser/extensions/api/alarms/alarm_manager.h
diff --git a/chrome/browser/extensions/api/alarms/alarm_manager.h b/chrome/browser/extensions/api/alarms/alarm_manager.h
index 8c0666c74f572ea001506adb1afb1d91858a2ed7..bd5f864dba5537d8144ee6faf5c56c1289121b80 100644
--- a/chrome/browser/extensions/api/alarms/alarm_manager.h
+++ b/chrome/browser/extensions/api/alarms/alarm_manager.h
@@ -184,6 +184,10 @@ class AlarmManager
void ReadFromStorage(const std::string& extension_id,
scoped_ptr<base::Value> value);
+ // Schedule the timer to go off at the specified |time|, and set
+ // |next_poll_time| appropriately.
+ void ScheduleTimer(const base::Time& time);
Yoyo Zhou 2014/01/29 21:30:16 Can this be called SetNextPollTime or some such? I
Devlin 2014/01/29 21:46:16 Done.
+
// Schedules the next poll of alarms for when the next soonest alarm runs,
// but not more often than the minimum granularity of all alarms.
void ScheduleNextPoll();
@@ -226,8 +230,8 @@ class AlarmManager
// The previous time that alarms were run.
base::Time last_poll_time_;
- // Next poll's time. Used only by unit tests.
- base::Time test_next_poll_time_;
+ // Next poll's time.
+ base::Time next_poll_time_;
DISALLOW_COPY_AND_ASSIGN(AlarmManager);
};

Powered by Google App Engine
This is Rietveld 408576698