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

Unified Diff: chrome/browser/chromeos/cros/network_library.cc

Issue 6347044: Only show notification for low 3g data for the last data-based plan.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | « chrome/browser/chromeos/cros/network_library.h ('k') | chrome/browser/chromeos/network_message_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/network_library.cc
===================================================================
--- chrome/browser/chromeos/cros/network_library.cc (revision 74304)
+++ chrome/browser/chromeos/cros/network_library.cc (working copy)
@@ -167,7 +167,7 @@
return ROAMING_STATE_UNKNOWN;
}
-}
+} // namespace
// Helper function to wrap Html with <th> tag.
static std::string WrapWithTH(std::string text) {
@@ -471,6 +471,17 @@
return string16();
}
+std::string CellularDataPlan::GetUniqueIdentifier() const {
+ // A cellular plan is uniquely described by the union of name, type,
+ // start time, end time, and max bytes.
+ // So we just return a union of all these variables.
+ return plan_name + "|" +
+ base::Int64ToString(plan_type) + "|" +
+ base::Int64ToString(plan_start_time.ToInternalValue()) + "|" +
+ base::Int64ToString(plan_end_time.ToInternalValue()) + "|" +
+ base::Int64ToString(plan_data_bytes);
+}
+
base::TimeDelta CellularDataPlan::remaining_time() const {
base::TimeDelta time = plan_end_time - base::Time::Now();
return time.InMicroseconds() < 0 ? base::TimeDelta() : time;
@@ -950,7 +961,7 @@
return;
is_locked_ = true;
NotifyNetworkManagerChanged();
- }
+ }
virtual void Unlock() {
DCHECK(is_locked_);
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.h ('k') | chrome/browser/chromeos/network_message_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698