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

Unified Diff: chrome/browser/chromeos/night_light/night_light_client.h

Issue 2966873002: [Night Light] CL12: String changes and fix frequent requests. (Closed)
Patch Set: Created 3 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
Index: chrome/browser/chromeos/night_light/night_light_client.h
diff --git a/chrome/browser/chromeos/night_light/night_light_client.h b/chrome/browser/chromeos/night_light/night_light_client.h
index 0f8580dfacd3c9e8766fd7e91f84d96ada9a8697..3d9a4097b4a303afee8c8bf1c730ebd55d7fb54e 100644
--- a/chrome/browser/chromeos/night_light/night_light_client.h
+++ b/chrome/browser/chromeos/night_light/night_light_client.h
@@ -46,6 +46,8 @@ class NightLightClient
const base::TimeDelta elapsed);
private:
+ void SendCurrentGeoposition();
James Cook 2017/06/30 19:12:26 nit: docs (send to who?)
afakhry 2017/06/30 22:28:28 Done.
+
void ScheduleNextRequest(base::TimeDelta delay);
// Virtual so that it can be overriden by a fake implementation in unit tests
@@ -63,6 +65,11 @@ class NightLightClient
base::OneShotTimer timer_;
+ // Last successful geoposition coordinates and its timestamp.
+ base::Time last_successful_request_;
James Cook 2017/06/30 19:12:26 optional: maybe |last_successful_geo_request_|?
afakhry 2017/06/30 22:28:28 Done. Actually named it |last_successful_geo_reque
+ double latitude_ = 0.0;
+ double longitude_ = 0.0;
+
// True as long as the schedule type is set to "sunset to sunrise", which
// means this client will be retrieving the IP-based geoposition once per day.
bool using_geoposition_ = false;

Powered by Google App Engine
This is Rietveld 408576698