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

Unified Diff: src/default_policy.cc

Issue 3528016: Cashew: implement backend usage API (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cashew.git
Patch Set: Fix code review nits and remove hardcoded usage URLs Created 10 years, 2 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 | « src/default_policy.h ('k') | src/device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/default_policy.cc
diff --git a/src/default_policy.cc b/src/default_policy.cc
new file mode 100644
index 0000000000000000000000000000000000000000..90f754f17b7c0f0a705f4880291e8786272c64ae
--- /dev/null
+++ b/src/default_policy.cc
@@ -0,0 +1,36 @@
+// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/default_policy.h"
+
+#include <glog/logging.h>
+
+namespace cashew {
+
+// default update timer interval in seconds
+static const guint kDefaultPolicyUpdateTimerIdleSecs = 60;
+
+DefaultPolicy::DefaultPolicy(const std::string& carrier) : carrier_(carrier) {
+}
+
+DefaultPolicy::~DefaultPolicy() {
+}
+
+const std::string& DefaultPolicy::GetCarrier() const {
+ return carrier_;
+}
+
+guint DefaultPolicy::GetUpdateTimerIdleSecs(const DataPlanList& plans) const {
+ return kDefaultPolicyUpdateTimerIdleSecs;
+}
+
+bool DefaultPolicy::ShouldEmitDataPlansUpdate(const DataPlanList& old_plans,
+ const DataPlanList& new_plans) const {
+ // unconditionally send an update
+ return true;
+}
+
+// private methods
+
+} // namespace cashew
« no previous file with comments | « src/default_policy.h ('k') | src/device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698