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

Unified Diff: base/registry_monitor_manager.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/registry_hive.cc ('k') | base/registry_monitor_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/registry_monitor_manager.h
diff --git a/base/registry_monitor_manager.h b/base/registry_monitor_manager.h
deleted file mode 100644
index 6cf9952ff220907d2d8db6e6a5e2eac6db0b5779..0000000000000000000000000000000000000000
--- a/base/registry_monitor_manager.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2008-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.
-// ========================================================================
-//
-// The RegistryMonitor allows a caller to request monitoring
-// for registry value changes across multiple keys. It uses the Windows API
-// function RegNotifyChangeKeyValue to notify when any value in a key changes.
-
-#ifndef OMAHA_COMMON_REGISTRY_MONITOR_MANAGER_H_
-#define OMAHA_COMMON_REGISTRY_MONITOR_MANAGER_H_
-
-#include <windows.h>
-#include <atlstr.h>
-#include "base/basictypes.h"
-#include "base/scoped_ptr.h"
-
-namespace omaha {
-
-namespace detail {
-
-class RegistryMonitorImpl;
-
-} // namespace detail
-
-// Called when a registry value changes. 'new_value_data' contains a
-// pointer to the string data for a string value or the value itself for a
-// DWORD value.
-enum RegistryChangeType {
- REGISTRY_CHANGE_TYPE_CREATE = 0,
- REGISTRY_CHANGE_TYPE_UPDATE,
- REGISTRY_CHANGE_TYPE_DELETE,
-};
-typedef void (*RegistryValueChangeCallback)(const TCHAR* key_name,
- const TCHAR* value_name,
- RegistryChangeType change_type,
- const void* new_value_data,
- void* user_data);
-
-// Called when a registry key changes. Changes include subkeys being
-// created or deleted as well as value changes under that key but not under
-// the subkeys of the key.
-typedef void (*RegistryKeyChangeCallback)(const TCHAR* key_name,
- void* user_data);
-
-class RegistryMonitor {
- public:
- RegistryMonitor();
- ~RegistryMonitor();
-
- HRESULT Initialize();
-
- // Monitors a registry sub key for changes. Registering the same sub key
- // overrides the previous registration.
- HRESULT MonitorKey(HKEY root_key,
- const CString& sub_key,
- RegistryKeyChangeCallback callback,
- void* user_data);
-
- // Adds a registry value to the list of values to monitor for changes.
- // All values must be registered before starting monitoring. Registering
- // the same value is allowed, although not particularly useful.
- HRESULT MonitorValue(HKEY root_key,
- const CString& sub_key,
- const CString& value_name,
- int value_type,
- RegistryValueChangeCallback callback,
- void* user_data);
-
- // Starts monitoring for changes.
- HRESULT StartMonitoring();
-
- private:
- scoped_ptr<detail::RegistryMonitorImpl> impl_;
-
- DISALLOW_EVIL_CONSTRUCTORS(RegistryMonitor);
-};
-
-} // namespace omaha
-
-#endif // OMAHA_COMMON_REGISTRY_MONITOR_MANAGER_H_
-
« no previous file with comments | « base/registry_hive.cc ('k') | base/registry_monitor_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698