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

Unified Diff: services/preferences/tracked/registry_hash_store_contents_win.h

Issue 2893703002: Cleanup PreferenceMACs on browser_tests startup (Closed)
Patch Set: fix compile 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: services/preferences/tracked/registry_hash_store_contents_win.h
diff --git a/services/preferences/tracked/registry_hash_store_contents_win.h b/services/preferences/tracked/registry_hash_store_contents_win.h
index 34496f97cec045cc4202a22a0ffc4a3d56c7742d..0b3b396205d60cda624442ace27e58a48357ce79 100644
--- a/services/preferences/tracked/registry_hash_store_contents_win.h
+++ b/services/preferences/tracked/registry_hash_store_contents_win.h
@@ -13,10 +13,15 @@
class RegistryHashStoreContentsWin : public HashStoreContents {
public:
// Constructs a RegistryHashStoreContents which acts on a registry entry
- // defined by |registry_path| and |store_key|.
+ // defined by |registry_path| and |store_key|. If |store_key| begins with
+ // base::ScopedTempDir::GetTempDirPrefix(), this RegistryHashStoreContentsWin
+ // will self Reset() on destruction to avoid proliferating keys in tests that
+ // create a profile in a ScopedTempDir (https://crbug.com/721245).
explicit RegistryHashStoreContentsWin(const base::string16& registry_path,
const base::string16& store_key);
+ ~RegistryHashStoreContentsWin() override;
+
// HashStoreContents overrides:
bool IsCopyable() const override;
std::unique_ptr<HashStoreContents> MakeCopy() const override;
@@ -44,6 +49,7 @@ class RegistryHashStoreContentsWin : public HashStoreContents {
const RegistryHashStoreContentsWin& other);
const base::string16 preference_key_name_;
+ const bool reset_on_delete_;
};
#endif // SERVICES_PREFERENCES_TRACKED_REGISTRY_HASH_STORE_CONTENTS_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698