OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_BROWSER_WATCHER_END_SESSION_WIN_H_ | |
6 #define COMPONENTS_BROWSER_WATCHER_END_SESSION_WIN_H_ | |
7 | |
8 #include "base/process/process_handle.h" | |
9 #include "base/strings/string16.h" | |
10 #include "base/win/registry.h" | |
11 | |
12 namespace browser_watcher { | |
13 | |
14 class ExitFunnel { | |
15 public: | |
16 ExitFunnel(); | |
17 ~ExitFunnel(); | |
18 | |
19 // Initializes the exit funnel with |registry_path| and |process|. | |
20 // |process| must be open for PROCESS_QUERY_INFORMATION at least. | |
21 // Returns false on failure to create or open the registry path corresponding | |
22 // to |process|. | |
23 bool Init(const base::char16* registry_path, base::ProcessHandle process); | |
24 | |
25 // 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.
| |
26 // this instance is associated with. Returns false on failure to record the | |
27 // event. | |
28 bool RecordEvent(const base::char16* event_name); | |
29 | |
30 // Records |event_name| at the current time in registry at |registry_path| for | |
31 // this process. | |
32 static bool RecordSingleEvent(const base::char16* registry_path, | |
33 const base::char16* event_name); | |
34 | |
35 private: | |
36 base::win::RegKey key_; | |
37 }; | |
38 | |
39 } // namespace browser_watcher | |
40 | |
41 #endif // COMPONENTS_BROWSER_WATCHER_END_SESSION_WIN_H_ | |
OLD | NEW |