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

Side by Side Diff: sandbox/win/wow_helper/service64_resolver.cc

Issue 399313006: Move bit_cast from base/macros.h to its own header (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chromeos compile after r368203 Created 4 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
« no previous file with comments | « sandbox/win/src/service_resolver_unittest.cc ('k') | sync/internal_api/http_bridge.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "sandbox/win/wow_helper/service64_resolver.h" 5 #include "sandbox/win/wow_helper/service64_resolver.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/bit_cast.h"
10 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
11 #include "sandbox/win/wow_helper/target_code.h" 12 #include "sandbox/win/wow_helper/target_code.h"
12 13
13 namespace { 14 namespace {
14 #pragma pack(push, 1) 15 #pragma pack(push, 1)
15 16
16 const BYTE kMovEax = 0xB8; 17 const BYTE kMovEax = 0xB8;
17 const BYTE kMovEdx = 0xBA; 18 const BYTE kMovEdx = 0xBA;
18 const USHORT kCallPtrEdx = 0x12FF; 19 const USHORT kCallPtrEdx = 0x12FF;
19 const BYTE kRet = 0xC2; 20 const BYTE kRet = 0xC2;
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 337
337 // and now change the function to intercept, on the child 338 // and now change the function to intercept, on the child
338 if (!::WriteProtectedChildMemory(process_, target_, &local_service, 339 if (!::WriteProtectedChildMemory(process_, target_, &local_service,
339 sizeof(local_service))) 340 sizeof(local_service)))
340 return STATUS_UNSUCCESSFUL; 341 return STATUS_UNSUCCESSFUL;
341 342
342 return STATUS_SUCCESS; 343 return STATUS_SUCCESS;
343 } 344 }
344 345
345 } // namespace sandbox 346 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/service_resolver_unittest.cc ('k') | sync/internal_api/http_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698