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

Unified Diff: base/win/registry.h

Issue 2963783002: Remove unsafe registry APIs from base::win::RegKey
Patch Set: half-fix remoting Created 3 years, 6 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
« no previous file with comments | « no previous file | base/win/registry.cc » ('j') | base/win/registry.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/registry.h
diff --git a/base/win/registry.h b/base/win/registry.h
index 9acbea2995eaf42d91cda0602095196937ffbf3e..f7da63175e8371cc91ce98e1c1c2c809ba77b9b2 100644
--- a/base/win/registry.h
+++ b/base/win/registry.h
@@ -33,10 +33,13 @@ class BASE_EXPORT RegKey {
typedef base::Callback<void()> ChangeCallback;
RegKey();
- explicit RegKey(HKEY key);
+ explicit RegKey(HKEY rootkey);
RegKey(HKEY rootkey, const wchar_t* subkey, REGSAM access);
~RegKey();
+ RegKey(RegKey&&);
+ RegKey& operator=(RegKey&&);
+
LONG Create(HKEY rootkey, const wchar_t* subkey, REGSAM access);
LONG CreateWithDisposition(HKEY rootkey, const wchar_t* subkey,
@@ -54,12 +57,6 @@ class BASE_EXPORT RegKey {
// Closes this reg key.
void Close();
- // Replaces the handle of the registry key and takes ownership of the handle.
- void Set(HKEY key);
-
- // Transfers ownership away from this object.
- HKEY Take();
-
// Returns false if this key does not have the specified value, or if an error
// occurrs while attempting to access it.
bool HasValue(const wchar_t* value_name) const;
« no previous file with comments | « no previous file | base/win/registry.cc » ('j') | base/win/registry.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698