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

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

Issue 2121203002: Add BrowsingDataCounterFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_bd_counters_to_components
Patch Set: Fixed Android code and rebase Created 4 years, 5 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
Index: chrome/browser/browsing_data/browsing_data_counter_factory.h
diff --git a/chrome/browser/browsing_data/browsing_data_counter_factory.h b/chrome/browser/browsing_data/browsing_data_counter_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..ca479336736c9fee37460d2219a743a13280ee40
--- /dev/null
+++ b/chrome/browser/browsing_data/browsing_data_counter_factory.h
@@ -0,0 +1,32 @@
+// Copyright 2016 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_FACTORY_H_
+#define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COUNTER_FACTORY_H_
+
+#include "base/macros.h"
+#include "base/strings/string16.h"
+
+class Profile;
+
+namespace browsing_data {
+class BrowsingDataCounter;
+}
+
+class BrowsingDataCounterFactory {
+ public:
+ // Creates a new instance of BrowsingDataCounter that is counting the data
+ // related to a given deletion preference |pref_name| for |profile|.
+ static browsing_data::BrowsingDataCounter* GetForPreference(
msramek 2016/07/07 11:55:33 Consider calling this GetForProfileAndPreference o
ioanap 2016/07/07 16:30:48 GetForProfileAndPref sounds good! Done.
+ std::string pref_name,
msramek 2016/07/07 11:55:33 nit: use a const ref to avoid copying the string
ioanap 2016/07/07 16:30:48 Done.
+ Profile* profile);
+
+ private:
+ BrowsingDataCounterFactory();
+ ~BrowsingDataCounterFactory();
+
+ DISALLOW_COPY_AND_ASSIGN(BrowsingDataCounterFactory);
+};
+
+#endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COUNTER_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698