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

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: Yoyo's 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/alarms/alarm_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0d04bbf044273a46662e2c8e48d5dd37592a17b5 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);
+ // Set the timer to go off at the specified |time|, and set |next_poll_time|
+ // appropriately.
+ void SetNextPollTime(const base::Time& time);
+
// 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);
};
« no previous file with comments | « no previous file | chrome/browser/extensions/api/alarms/alarm_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698