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

Unified Diff: src/byte_counter.cc

Issue 5180003: cashew: add local byte counters (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cashew.git@master
Patch Set: Address jglasgow and zelidrag (offline) code review comments Created 10 years, 1 month 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/byte_counter.h ('k') | src/data_plan.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/byte_counter.cc
diff --git a/src/byte_counter.cc b/src/byte_counter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a688cb9d9f73c8626438a006a6871865c6d8315e
--- /dev/null
+++ b/src/byte_counter.cc
@@ -0,0 +1,19 @@
+// 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/byte_counter.h"
+
+#include <glog/logging.h>
+
+#include "src/procfs_byte_counter.h"
+
+namespace cashew {
+
+// static
+ByteCounter* ByteCounter::NewByteCounter(const std::string& interface) {
+ DCHECK(!interface.empty());
+ return new(std::nothrow) ProcfsByteCounter(interface);
+}
+
+} // namespace cashew
« no previous file with comments | « src/byte_counter.h ('k') | src/data_plan.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698