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

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

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

Powered by Google App Engine
This is Rietveld 408576698