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

Side by Side Diff: base/win/pe_image.cc

Issue 3836005: Move pe_image and registry from base to base/win and use the namespace. It re... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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
« no previous file with comments | « base/win/pe_image.h ('k') | base/win/pe_image_unittest.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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file implements PEImage, a generic class to manipulate PE files. 5 // This file implements PEImage, a generic class to manipulate PE files.
6 // This file was adapted from GreenBorder's Code. 6 // This file was adapted from GreenBorder's Code.
7 7
8 #include "base/pe_image.h" 8 #include "base/win/pe_image.h"
9
10 namespace base {
11 namespace win {
9 12
10 #if defined(_WIN64) && !defined(NACL_WIN64) 13 #if defined(_WIN64) && !defined(NACL_WIN64)
11 // TODO(rvargas): Bug 27218. Make sure this is ok. 14 // TODO(rvargas): Bug 27218. Make sure this is ok.
12 #error This code is not tested on x64. Please make sure all the base unit tests\ 15 #error This code is not tested on x64. Please make sure all the base unit tests\
13 pass before doing any real work. The current unit tests don't test the\ 16 pass before doing any real work. The current unit tests don't test the\
14 differences between 32- and 64-bits implementations. Bugs may slip through.\ 17 differences between 32- and 64-bits implementations. Bugs may slip through.\
15 You need to improve the coverage before continuing. 18 You need to improve the coverage before continuing.
16 #endif 19 #endif
17 20
18 // Structure to perform imports enumerations. 21 // Structure to perform imports enumerations.
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 return NULL; 558 return NULL;
556 559
557 PVOID in_memory = PEImage::RVAToAddr(rva); 560 PVOID in_memory = PEImage::RVAToAddr(rva);
558 DWORD dummy; 561 DWORD dummy;
559 562
560 if (!ImageAddrToOnDiskOffset(in_memory, &dummy)) 563 if (!ImageAddrToOnDiskOffset(in_memory, &dummy))
561 return NULL; 564 return NULL;
562 565
563 return in_memory; 566 return in_memory;
564 } 567 }
568
569 } // namespace win
570 } // namespace base
OLDNEW
« no previous file with comments | « base/win/pe_image.h ('k') | base/win/pe_image_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698