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

Unified Diff: base/registry_hive.h

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 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 | « base/regexp.cc ('k') | base/registry_hive.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/registry_hive.h
diff --git a/base/registry_hive.h b/base/registry_hive.h
deleted file mode 100644
index cf34680805d6145d047943dfc69de9190ac4c6c8..0000000000000000000000000000000000000000
--- a/base/registry_hive.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2004-2009 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ========================================================================
-//
-// Other persons' registry hive manipulations.
-//
-#ifndef OMAHA_COMMON_REGISTRY_HIVE_H_
-#define OMAHA_COMMON_REGISTRY_HIVE_H_
-
-#include <windows.h>
-#include <atlstr.h>
-
-namespace omaha {
-
-#define kProfileKeyFormat \
- _T("HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\%s")
-#define kProfilePathValue _T("ProfileImagePath")
-#define kHiveName _T("Ntuser.dat")
-
-// !!! Warning !!!
-// You MUST unload hive, or this hive becomes unavailable until PC is restarted
-// This means the person cannot login.
-class RegistryHive {
- public:
- RegistryHive();
- ~RegistryHive();
-
- // Loads hive for requested SID. SID should be in format "S-X-X....."
- // name is a name under which the hive will be added to the HKEY_USERS,
- // you could use persons name here. This parameter should not have '\\'
- // characters!
- // It is not recommended to load more than one hive at once - LoadHive,
- // manipulate hive, UnloadHive, and then work on the next one.
- HRESULT LoadHive(TCHAR const * sid, TCHAR const *name);
- // Loads hive for requested SID, but only if the SID is another user
- // (since we don't need to do anything if the sid is ours)
- HRESULT LoadHive(TCHAR const * sid);
- // Unloads and saves loaded hive
- HRESULT UnloadHive();
- // Does it recursively. The name should be relative to HKEY_CURRENT_USER.
- HRESULT DeleteUserKey(TCHAR const * key_name);
- // Expands key name for hive:
- // "Software\Google" => "HKEY_USERS\[hive_name_]\Software\Google"
- void ExpandKeyName(CString * str);
-
- private:
- CString hive_name_;
- HKEY hive_holding_key_;
-};
-
-// Function pointer
-// Return non-zero to abort the enumeration
-typedef int ProcessUserRegistryFunc(const TCHAR* user_sid,
- const TCHAR* user_reg_key,
- LONG_PTR param);
-
-// Enumerate all user registries
-void EnumerateAllUserRegistries(ProcessUserRegistryFunc* handler,
- LONG_PTR param);
-
-} // namespace omaha
-
-#endif // OMAHA_COMMON_REGISTRY_HIVE_H_
« no previous file with comments | « base/regexp.cc ('k') | base/registry_hive.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698