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

Side by Side Diff: snapshot/win/process_reader_win.h

Issue 936333004: win: Add implementation of system_snapshot for Windows (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@add-time-win
Patch Set: fixes Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « snapshot/system_snapshot.h ('k') | snapshot/win/process_reader_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 #ifndef CRASHPAD_SNAPSHOT_WIN_PROCESS_READER_WIN_H_
16 #define CRASHPAD_SNAPSHOT_WIN_PROCESS_READER_WIN_H_
17
18 #include <windows.h>
19
20 #include "util/misc/initialization_state_dcheck.h"
21
22 namespace crashpad {
23
24 //! \brief Accesses information about another process, identified by a HANDLE.
25 class ProcessReaderWin {
26 public:
27 ProcessReaderWin();
28 ~ProcessReaderWin();
29
30 //! \brief Initializes this object. This method must be called before any
31 //! other.
32 //!
33 //! \param[in] process Process handle, must have PROCESS_QUERY_INFORMATION,
34 //! PROCESS_VM_READ, and PROCESS_DUP_HANDLE access.
35 //!
36 //! \return `true` on success, indicating that this object will respond
37 //! validly to further method calls. `false` on failure. On failure, no
38 //! further method calls should be made.
39 bool Initialize(HANDLE process);
40
41 //! \return `true` if the target task is a 64-bit process.
42 bool Is64Bit() const { return is_64_bit_; }
43
44 private:
45 bool is_64_bit_;
46 InitializationStateDcheck initialized_;
47
48 DISALLOW_COPY_AND_ASSIGN(ProcessReaderWin);
49 };
50
51 } // namespace crashpad
52
53 #endif // CRASHPAD_SNAPSHOT_WIN_PROCESS_READER_WIN_H_
OLDNEW
« no previous file with comments | « snapshot/system_snapshot.h ('k') | snapshot/win/process_reader_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698