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

Unified Diff: chrome/browser/browsing_data/browsing_data_counter_utils.h

Issue 1527653004: Move browsing data counters helper functions to an 'utils' file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Default flag value. Created 5 years 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
Index: chrome/browser/browsing_data/browsing_data_counter_utils.h
diff --git a/chrome/browser/browsing_data/browsing_data_counter_utils.h b/chrome/browser/browsing_data/browsing_data_counter_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..2206d24343c813c6880eab663132ae3f350f47e6
--- /dev/null
+++ b/chrome/browser/browsing_data/browsing_data_counter_utils.h
@@ -0,0 +1,25 @@
+// Copyright 2015 The Chromium 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 CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COUNTER_UTILS_H_
+#define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COUNTER_UTILS_H_
+
+#include "chrome/browser/browsing_data/browsing_data_counter.h"
+
+namespace browsing_data {
Bernhard Bauer 2015/12/16 13:35:32 I think the general guideline now is against using
msramek 2016/01/05 16:22:50 I removed the namespace; it's true that other file
+
+// Whether the browsing data counters experiment is enabled.
+bool AreCountersEnabled();
+
+// Constructs the text to be displayed by a counter from the given |result|.
+base::string16 GetCounterTextFromResult(
Bernhard Bauer 2015/12/16 13:35:32 #include "base/string16.h"
msramek 2016/01/05 16:22:50 Done.
+ const BrowsingDataCounter::Result* result);
+
+// Creates a new instance of BrowsingDataCounter that is counting the data
+// related to a given deletion preference |pref_name|.
+BrowsingDataCounter* CreateCounterForPreference(std::string pref_name);
+
+} // namespace browsing_data
+
+#endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COUNTER_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698