| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/user_prefs/tracked/registry_hash_store_contents_win.h" | 5 #include "services/preferences/tracked/registry_hash_store_contents_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "base/numerics/safe_conversions.h" | 11 #include "base/numerics/safe_conversions.h" |
| 12 #include "base/strings/string_split.h" | 12 #include "base/strings/string_split.h" |
| 13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "base/win/registry.h" | 16 #include "base/win/registry.h" |
| 17 #include "components/user_prefs/tracked/tracked_preference_histogram_names.h" | 17 #include "services/preferences/public/cpp/tracked/tracked_preference_histogram_n
ames.h" |
| 18 | 18 |
| 19 using base::win::RegistryValueIterator; | 19 using base::win::RegistryValueIterator; |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 constexpr size_t kMacSize = 64; | 23 constexpr size_t kMacSize = 64; |
| 24 | 24 |
| 25 base::string16 GetSplitPrefKeyName(const base::string16& reg_key_name, | 25 base::string16 GetSplitPrefKeyName(const base::string16& reg_key_name, |
| 26 const std::string& split_key_name) { | 26 const std::string& split_key_name) { |
| 27 return reg_key_name + L"\\" + base::UTF8ToUTF16(split_key_name); | 27 return reg_key_name + L"\\" + base::UTF8ToUTF16(split_key_name); |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 std::string RegistryHashStoreContentsWin::GetSuperMac() const { | 173 std::string RegistryHashStoreContentsWin::GetSuperMac() const { |
| 174 NOTREACHED() | 174 NOTREACHED() |
| 175 << "RegistryHashStoreContents does not support the GetSuperMac operation"; | 175 << "RegistryHashStoreContents does not support the GetSuperMac operation"; |
| 176 return NULL; | 176 return NULL; |
| 177 } | 177 } |
| 178 | 178 |
| 179 void RegistryHashStoreContentsWin::SetSuperMac(const std::string& super_mac) { | 179 void RegistryHashStoreContentsWin::SetSuperMac(const std::string& super_mac) { |
| 180 NOTREACHED() | 180 NOTREACHED() |
| 181 << "RegistryHashStoreContents does not support the SetSuperMac operation"; | 181 << "RegistryHashStoreContents does not support the SetSuperMac operation"; |
| 182 } | 182 } |
| OLD | NEW |