| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/default_policy.h" | 5 #include "src/default_policy.h" |
| 6 | 6 |
| 7 #include <glog/logging.h> | 7 #include <glog/logging.h> |
| 8 | 8 |
| 9 namespace cashew { | 9 namespace cashew { |
| 10 | 10 |
| 11 // default update timer interval in seconds | 11 // default update timer interval in seconds |
| 12 static const guint kSecondsPerMinute = 60; | 12 static const guint kSecondsPerMinute = 60; |
| 13 static const guint kDefaultPolicyUpdateTimerIdleSecs = 10 * kSecondsPerMinute; | 13 static const guint kDefaultPolicyUpdateTimerIdleSecs = 1 * kSecondsPerMinute; |
| 14 | 14 |
| 15 DefaultPolicy::DefaultPolicy(const std::string& carrier) : carrier_(carrier) { | 15 DefaultPolicy::DefaultPolicy(const std::string& carrier) : carrier_(carrier) { |
| 16 } | 16 } |
| 17 | 17 |
| 18 DefaultPolicy::~DefaultPolicy() { | 18 DefaultPolicy::~DefaultPolicy() { |
| 19 } | 19 } |
| 20 | 20 |
| 21 const std::string& DefaultPolicy::GetCarrier() const { | 21 const std::string& DefaultPolicy::GetCarrier() const { |
| 22 return carrier_; | 22 return carrier_; |
| 23 } | 23 } |
| 24 | 24 |
| 25 guint DefaultPolicy::GetUpdateTimerIdleSecs(const DataPlanList& plans) const { | 25 guint DefaultPolicy::GetUpdateTimerIdleSecs(const DataPlanList& plans) const { |
| 26 return kDefaultPolicyUpdateTimerIdleSecs; | 26 return kDefaultPolicyUpdateTimerIdleSecs; |
| 27 } | 27 } |
| 28 | 28 |
| 29 bool DefaultPolicy::ShouldEmitDataPlansUpdate(const DataPlanList& old_plans, | 29 bool DefaultPolicy::ShouldEmitDataPlansUpdate(const DataPlanList& plans) const { |
| 30 const DataPlanList& new_plans) const { | |
| 31 // unconditionally send an update | 30 // unconditionally send an update |
| 32 return true; | 31 return true; |
| 33 } | 32 } |
| 34 | 33 |
| 35 bool DefaultPolicy::UsageRequestsMustBeSentOTA() const { | |
| 36 return true; | |
| 37 } | |
| 38 | |
| 39 bool DefaultPolicy::ZonelessTimeStringsAreLocal() const { | 34 bool DefaultPolicy::ZonelessTimeStringsAreLocal() const { |
| 40 return true; | 35 return true; |
| 41 } | 36 } |
| 42 | 37 |
| 43 // private methods | 38 // private methods |
| 44 | 39 |
| 45 } // namespace cashew | 40 } // namespace cashew |
| OLD | NEW |