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

Unified Diff: src/default_policy.h

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/data_plan_provider.cc ('k') | src/default_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/default_policy.h
diff --git a/src/default_policy.h b/src/default_policy.h
new file mode 100644
index 0000000000000000000000000000000000000000..ef7c94767326561b14bf414c55463d2ad2ff8291
--- /dev/null
+++ b/src/default_policy.h
@@ -0,0 +1,39 @@
+// 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.
+
+#ifndef SRC_DEFAULT_POLICY_H_
+#define SRC_DEFAULT_POLICY_H_
+
+#include <string>
+
+#include <base/basictypes.h> // NOLINT
+
+#include "src/policy.h"
+
+namespace cashew {
+
+// a bare-bones default carrier policy
+class DefaultPolicy: public Policy {
+ public:
+
+ explicit DefaultPolicy(const std::string& carrier);
+ virtual ~DefaultPolicy();
+
+ virtual const std::string& GetCarrier() const;
+
+ virtual guint GetUpdateTimerIdleSecs(const DataPlanList& plans) const;
+
+ virtual bool ShouldEmitDataPlansUpdate(const DataPlanList& old_plans,
+ const DataPlanList& new_plans) const;
+
+ private:
+ // carrier
+ const std::string carrier_;
+
+ DISALLOW_COPY_AND_ASSIGN(DefaultPolicy);
+};
+
+} // namespace cashew
+
+#endif // SRC_DEFAULT_POLICY_H_
« no previous file with comments | « src/data_plan_provider.cc ('k') | src/default_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698