Chromium Code Reviews| Index: components/browser_watcher/exit_funnel_win.h |
| diff --git a/components/browser_watcher/exit_funnel_win.h b/components/browser_watcher/exit_funnel_win.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..251a31edac0b7b9ebde97d3af0f715db29391098 |
| --- /dev/null |
| +++ b/components/browser_watcher/exit_funnel_win.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright (c) 2014 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 COMPONENTS_BROWSER_WATCHER_END_SESSION_WIN_H_ |
| +#define COMPONENTS_BROWSER_WATCHER_END_SESSION_WIN_H_ |
| + |
| +#include "base/process/process_handle.h" |
| +#include "base/strings/string16.h" |
| +#include "base/win/registry.h" |
| + |
| +namespace browser_watcher { |
| + |
| +class ExitFunnel { |
| + public: |
| + ExitFunnel(); |
| + ~ExitFunnel(); |
| + |
| + // Initializes the exit funnel with |registry_path| and |process|. |
| + // |process| must be open for PROCESS_QUERY_INFORMATION at least. |
| + // Returns false on failure to create or open the registry path corresponding |
| + // to |process|. |
| + bool Init(const base::char16* registry_path, base::ProcessHandle process); |
| + |
| + // Records |event_name| at the current time in registry for the process |
|
erikwright (departed)
2014/12/11 15:00:46
the registry
Sigurður Ásgeirsson
2014/12/12 16:21:40
Done.
|
| + // this instance is associated with. Returns false on failure to record the |
| + // event. |
| + bool RecordEvent(const base::char16* event_name); |
| + |
| + // Records |event_name| at the current time in registry at |registry_path| for |
| + // this process. |
| + static bool RecordSingleEvent(const base::char16* registry_path, |
| + const base::char16* event_name); |
| + |
| + private: |
| + base::win::RegKey key_; |
| +}; |
| + |
| +} // namespace browser_watcher |
| + |
| +#endif // COMPONENTS_BROWSER_WATCHER_END_SESSION_WIN_H_ |