| 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_);
|
|
|