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

Unified Diff: components/browsing_data/core/counters/browsing_data_counter.h

Issue 2855623005: Move browsing_data counter sync tests to separate file (Closed)
Patch Set: remove HistoryResult and PasswordResult Created 3 years, 7 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: components/browsing_data/core/counters/browsing_data_counter.h
diff --git a/components/browsing_data/core/counters/browsing_data_counter.h b/components/browsing_data/core/counters/browsing_data_counter.h
index d7fbb956dce78eef66fd6c315160d6a2f7b08c23..8ea6c2c40b7b2739f9fea82589868a86c4082bf8 100644
--- a/components/browsing_data/core/counters/browsing_data_counter.h
+++ b/components/browsing_data/core/counters/browsing_data_counter.h
@@ -60,6 +60,23 @@ class BrowsingDataCounter {
DISALLOW_COPY_AND_ASSIGN(FinishedResult);
};
+ // A subclass of FinishedResult that besides |Value()| also stores whether
+ // the datatype is synced.
+ class SyncResult : public FinishedResult {
+ public:
+ SyncResult(const BrowsingDataCounter* source,
+ ResultInt value,
+ bool sync_enabled);
+ ~SyncResult() override;
+
+ bool IsSyncEnabled() const;
+
+ private:
+ bool sync_enabled_;
+
+ DISALLOW_COPY_AND_ASSIGN(SyncResult);
+ };
+
typedef base::Callback<void(std::unique_ptr<Result>)> Callback;
// Every calculation progresses through a state machine. At initialization,

Powered by Google App Engine
This is Rietveld 408576698