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

Side by Side Diff: chrome_frame/crash_reporting/nt_loader.cc

Issue 126143005: Remove Chrome Frame code and resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to r244038 Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2009 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 #include "chrome_frame/crash_reporting/nt_loader.h"
5
6 #include <winnt.h>
7 #include <winternl.h>
8 #include "base/logging.h"
9
10 namespace nt_loader {
11
12 LDR_DATA_TABLE_ENTRY* GetLoaderEntry(HMODULE module) {
13 // Make sure we own the loader's lock on entry here.
14 DCHECK(OwnsCriticalSection(GetLoaderLock()));
15 PEB* peb = GetCurrentPeb();
16
17 LIST_ENTRY* head = &peb->Ldr->InLoadOrderModuleList;
18 for (LIST_ENTRY* entry = head->Flink; entry != head; entry = entry->Flink) {
19 LDR_DATA_TABLE_ENTRY* ldr_entry =
20 CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
21
22 if (reinterpret_cast<HMODULE>(ldr_entry->DllBase) == module)
23 return ldr_entry;
24 }
25
26 return NULL;
27 }
28
29 } // namespace nt_loader
OLDNEW
« no previous file with comments | « chrome_frame/crash_reporting/nt_loader.h ('k') | chrome_frame/crash_reporting/nt_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698