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

Unified Diff: chrome/browser/prefs/tracked/tracked_preference_helper.h

Issue 1227973003: Componentize //chrome/browser/prefs/tracked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 4 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/prefs/tracked/tracked_preference_helper.h
diff --git a/chrome/browser/prefs/tracked/tracked_preference_helper.h b/chrome/browser/prefs/tracked/tracked_preference_helper.h
deleted file mode 100644
index 8f9b7b6b150ea0e7c27745a95c45ad1bb504e52b..0000000000000000000000000000000000000000
--- a/chrome/browser/prefs/tracked/tracked_preference_helper.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2014 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_PREFS_TRACKED_TRACKED_PREFERENCE_HELPER_H_
-#define CHROME_BROWSER_PREFS_TRACKED_TRACKED_PREFERENCE_HELPER_H_
-
-#include <string>
-
-#include "base/macros.h"
-#include "chrome/browser/prefs/tracked/pref_hash_filter.h"
-#include "chrome/browser/prefs/tracked/pref_hash_store_transaction.h"
-
-// A TrackedPreferenceHelper is a helper class for TrackedPreference which
-// handles decision making and reporting for TrackedPreference's
-// implementations.
-class TrackedPreferenceHelper {
- public:
- enum ResetAction {
- DONT_RESET,
- // WANTED_RESET is reported when DO_RESET would have been reported but the
- // current |enforcement_level| doesn't allow a reset for the detected state.
- WANTED_RESET,
- DO_RESET,
- };
-
- TrackedPreferenceHelper(const std::string& pref_path,
- size_t reporting_id,
- size_t reporting_ids_count,
- PrefHashFilter::EnforcementLevel enforcement_level,
- PrefHashFilter::ValueType value_type);
-
- // Returns a ResetAction stating whether a reset is desired (DO_RESET) or not
- // (DONT_RESET) based on observing |value_state|. Can also return WANTED_RESET
- // if a reset would have been desired but the current |enforcement_level|
- // doesn't allow it.
- ResetAction GetAction(
- PrefHashStoreTransaction::ValueState value_state) const;
-
- // Returns true if the preference value may contain personal information.
- bool IsPersonal() const;
-
- // Reports |value_state| via UMA under |reporting_id_|.
- void ReportValidationResult(
- PrefHashStoreTransaction::ValueState value_state) const;
-
- // Reports |reset_action| via UMA under |reporting_id_|.
- void ReportAction(ResetAction reset_action) const;
-
- // Reports, via UMA, the |count| of split preference entries that were
- // considered invalid in a CHANGED event.
- void ReportSplitPreferenceChangedCount(size_t count) const;
-
- private:
- const std::string pref_path_;
-
- const size_t reporting_id_;
- const size_t reporting_ids_count_;
-
- // Deny setting changes and hash seeding/migration.
- const bool enforce_;
-
- const bool personal_;
-
- DISALLOW_COPY_AND_ASSIGN(TrackedPreferenceHelper);
-};
-
-#endif // CHROME_BROWSER_PREFS_TRACKED_TRACKED_PREFERENCE_HELPER_H_
« no previous file with comments | « chrome/browser/prefs/tracked/tracked_preference.h ('k') | chrome/browser/prefs/tracked/tracked_preference_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698