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

Unified Diff: chrome/installer/setup/user_hive_visitor.h

Issue 2027063002: Introduce UserHiveVisitor for performing operations on local users' registry hives. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gab review Created 4 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 | « chrome/installer/setup/uninstall.cc ('k') | chrome/installer/setup/user_hive_visitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/user_hive_visitor.h
diff --git a/chrome/installer/setup/user_hive_visitor.h b/chrome/installer/setup/user_hive_visitor.h
new file mode 100644
index 0000000000000000000000000000000000000000..8cc8292a3e9b88072ff3ca43a27905949c4482c7
--- /dev/null
+++ b/chrome/installer/setup/user_hive_visitor.h
@@ -0,0 +1,30 @@
+// Copyright 2016 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_INSTALLER_SETUP_USER_HIVE_VISITOR_H_
+#define CHROME_INSTALLER_SETUP_USER_HIVE_VISITOR_H_
+
+#include "base/callback_forward.h"
+
+namespace base {
+namespace win {
+class RegKey;
+}
+}
+
+namespace installer {
+
+// The visitor callback invoked for each user's registry hive by
+// |VisitUserHives|. |user_sid| is the user SID being visited. |key| is the root
+// of that user's registry hive. Implementations return |true| to indicate that
+// the visits should continue, or |false| to indicate that visits should stop.
+using HiveVisitor =
+ base::Callback<bool(const wchar_t* user_sid, base::win::RegKey* key)>;
+
+// Runs |visitor| for each local user profile's registry hive.
+void VisitUserHives(const HiveVisitor& visitor);
+
+} // namespace installer
+
+#endif // CHROME_INSTALLER_SETUP_USER_HIVE_VISITOR_H_
« no previous file with comments | « chrome/installer/setup/uninstall.cc ('k') | chrome/installer/setup/user_hive_visitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698