Index: components/user_prefs/tracked/registry_hash_store_contents_win.cc |
diff --git a/components/user_prefs/tracked/registry_hash_store_contents_win.cc b/components/user_prefs/tracked/registry_hash_store_contents_win.cc |
index 9d8dcbdeb58639c4c53cd20e0a140ff86c2f5005..a84e1c32ed24181485ed6504cdb69a0cc4815d52 100644 |
--- a/components/user_prefs/tracked/registry_hash_store_contents_win.cc |
+++ b/components/user_prefs/tracked/registry_hash_store_contents_win.cc |
@@ -13,12 +13,13 @@ |
#include "base/strings/utf_string_conversions.h" |
#include "base/values.h" |
#include "base/win/registry.h" |
+#include "components/user_prefs/tracked/tracked_preference_histogram_names.h" |
using base::win::RegistryValueIterator; |
namespace { |
-constexpr size_t kMacSize = 32; |
+constexpr size_t kMacSize = 64; |
base::string16 GetSplitPrefKeyName(const base::string16& reg_key_name, |
const std::string& split_key_name) { |
@@ -72,6 +73,20 @@ RegistryHashStoreContentsWin::RegistryHashStoreContentsWin( |
: preference_key_name_(registry_path + L"\\PreferenceMACs\\" + |
profile_name) {} |
+RegistryHashStoreContentsWin::RegistryHashStoreContentsWin( |
+ const base::string16& preference_key_name) |
+ : preference_key_name_(preference_key_name) {} |
+ |
+std::unique_ptr<HashStoreContents> RegistryHashStoreContentsWin::MakeCopy() |
+ const { |
+ return std::unique_ptr<HashStoreContents>( |
+ new RegistryHashStoreContentsWin(preference_key_name_)); |
+} |
+ |
+std::string RegistryHashStoreContentsWin::GetUMASuffix() const { |
+ return user_prefs::tracked::kTrackedPrefRegistryValidationSuffix; |
+} |
+ |
void RegistryHashStoreContentsWin::Reset() { |
base::win::RegKey key; |
if (key.Open(HKEY_CURRENT_USER, preference_key_name_.c_str(), |
@@ -137,7 +152,6 @@ void RegistryHashStoreContentsWin::SetSplitMac(const std::string& path, |
} |
bool RegistryHashStoreContentsWin::RemoveEntry(const std::string& path) { |
- // ClearSplitMac is first to avoid short-circuit issues. |
return ClearAtomicMac(preference_key_name_, path) || |
ClearSplitMac(preference_key_name_, path); |
} |
@@ -145,22 +159,22 @@ bool RegistryHashStoreContentsWin::RemoveEntry(const std::string& path) { |
void RegistryHashStoreContentsWin::ImportEntry(const std::string& path, |
const base::Value* in_value) { |
NOTREACHED() |
- << "RegistryHashStore does not support the ImportEntry operation"; |
+ << "RegistryHashStoreContents does not support the ImportEntry operation"; |
} |
const base::DictionaryValue* RegistryHashStoreContentsWin::GetContents() const { |
NOTREACHED() |
- << "RegistryHashStore does not support the GetContents operation"; |
+ << "RegistryHashStoreContents does not support the GetContents operation"; |
return NULL; |
} |
std::string RegistryHashStoreContentsWin::GetSuperMac() const { |
NOTREACHED() |
- << "RegistryHashStore does not support the GetSuperMac operation"; |
+ << "RegistryHashStoreContents does not support the GetSuperMac operation"; |
return NULL; |
} |
void RegistryHashStoreContentsWin::SetSuperMac(const std::string& super_mac) { |
NOTREACHED() |
- << "RegistryHashStore does not support the SetSuperMac operation"; |
+ << "RegistryHashStoreContents does not support the SetSuperMac operation"; |
} |