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

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

Issue 2594723002: Count number of origins with data affected by clearing "cookies and site data". (Closed)
Patch Set: Add comments for issues with incomplete data deletion Created 3 years, 11 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/cookie_counter.h
diff --git a/chrome/browser/browsing_data/cookie_counter.h b/chrome/browser/browsing_data/cookie_counter.h
new file mode 100644
index 0000000000000000000000000000000000000000..23b2bcaf752c0752fe2622fcc456db08db2ab7fb
--- /dev/null
+++ b/chrome/browser/browsing_data/cookie_counter.h
@@ -0,0 +1,29 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
msramek 2017/01/09 12:54:43 nit: s/(c) //g (we don't use "(c)" anymore in new
dullweber 2017/01/09 16:05:46 Updated all new files
+// 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_COOKIE_COUNTER_H_
+#define CHROME_BROWSER_BROWSING_DATA_COOKIE_COUNTER_H_
+
+#include "base/memory/weak_ptr.h"
+#include "chrome/browser/profiles/profile.h"
msramek 2017/01/09 12:54:43 nit: Forward declaration should be enough.
dullweber 2017/01/09 16:05:46 Done.
+#include "components/browsing_data/core/counters/browsing_data_counter.h"
+
+class CookieCounter : public browsing_data::BrowsingDataCounter {
msramek 2017/01/09 12:54:43 Even though we colloquially refers to the item in
dullweber 2017/01/09 16:05:46 Done.
+ public:
+ explicit CookieCounter(Profile* profile);
+ ~CookieCounter() override;
+
+ const char* GetPrefName() const override;
+
+ private:
+ Profile* profile_;
msramek 2017/01/09 12:54:43 style: Methods before attributes (I know, I know :
dullweber 2017/01/09 16:05:46 Done.
+
+ base::WeakPtrFactory<CookieCounter> weak_ptr_factory_;
+
+ void Count() override;
+
+ void Done(int origin_count);
+};
+
+#endif // CHROME_BROWSER_BROWSING_DATA_COOKIE_COUNTER_H_

Powered by Google App Engine
This is Rietveld 408576698