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

Unified Diff: components/offline_pages/background/device_conditions.h

Issue 2113383002: More detailed implementation of the RequestPicker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify picker logic for multiple criteria Created 4 years, 5 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: components/offline_pages/background/device_conditions.h
diff --git a/components/offline_pages/background/device_conditions.h b/components/offline_pages/background/device_conditions.h
index e26c7d1289b0c57b9fab74b29522379ee57a11c2..13366a7cd7073bc8e489d6b4384d1f828fc04baf 100644
--- a/components/offline_pages/background/device_conditions.h
+++ b/components/offline_pages/background/device_conditions.h
@@ -20,6 +20,15 @@ class DeviceConditions {
battery_percentage_(battery_percentage),
net_connection_type_(net_connection_type) {}
+ DeviceConditions()
+ : power_connected_(true), battery_percentage_(75),
+ net_connection_type_(net::NetworkChangeNotifier::CONNECTION_WIFI) {}
+
+ DeviceConditions(const DeviceConditions& other)
fgorski 2016/07/20 16:23:30 Given that you are defining the copy constructor,
fgorski 2016/07/21 17:01:20 I think you missed this one.
Pete Williamson 2016/07/21 19:48:45 Ah, right, sorry. I intentionally left the assign
+ : power_connected_(other.power_connected_),
+ battery_percentage_(other.battery_percentage_),
fgorski 2016/07/20 16:23:31 nit: please align properly
Pete Williamson 2016/07/20 19:50:43 Done.
+ net_connection_type_(other.net_connection_type_) {}
+
// Returns whether power is connected.
bool IsPowerConnected() const { return power_connected_; }

Powered by Google App Engine
This is Rietveld 408576698