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

Side by Side Diff: sandbox/src/registry_dispatcher.cc

Issue 3823002: Move windows version-related stuff out of base/win_util and into base/win/win... (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
OLDNEW
1 // Copyright (c) 2006-2010 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 #include "sandbox/src/registry_dispatcher.h" 5 #include "sandbox/src/registry_dispatcher.h"
6 6
7 #include "base/scoped_handle_win.h" 7 #include "base/scoped_handle_win.h"
8 #include "base/win_util.h" 8 #include "base/win/windows_version.h"
9 #include "sandbox/src/crosscall_client.h" 9 #include "sandbox/src/crosscall_client.h"
10 #include "sandbox/src/interception.h" 10 #include "sandbox/src/interception.h"
11 #include "sandbox/src/interceptors.h" 11 #include "sandbox/src/interceptors.h"
12 #include "sandbox/src/ipc_tags.h" 12 #include "sandbox/src/ipc_tags.h"
13 #include "sandbox/src/sandbox_nt_util.h" 13 #include "sandbox/src/sandbox_nt_util.h"
14 #include "sandbox/src/policy_broker.h" 14 #include "sandbox/src/policy_broker.h"
15 #include "sandbox/src/policy_params.h" 15 #include "sandbox/src/policy_params.h"
16 #include "sandbox/src/sandbox.h" 16 #include "sandbox/src/sandbox.h"
17 #include "sandbox/src/registry_interception.h" 17 #include "sandbox/src/registry_interception.h"
18 #include "sandbox/src/registry_policy.h" 18 #include "sandbox/src/registry_policy.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 ipc_calls_.push_back(open_params); 56 ipc_calls_.push_back(open_params);
57 } 57 }
58 58
59 bool RegistryDispatcher::SetupService(InterceptionManager* manager, 59 bool RegistryDispatcher::SetupService(InterceptionManager* manager,
60 int service) { 60 int service) {
61 if (IPC_NTCREATEKEY_TAG == service) 61 if (IPC_NTCREATEKEY_TAG == service)
62 return INTERCEPT_NT(manager, NtCreateKey, CREATE_KEY_ID, 32); 62 return INTERCEPT_NT(manager, NtCreateKey, CREATE_KEY_ID, 32);
63 63
64 if (IPC_NTOPENKEY_TAG == service) { 64 if (IPC_NTOPENKEY_TAG == service) {
65 bool result = INTERCEPT_NT(manager, NtOpenKey, OPEN_KEY_ID, 16); 65 bool result = INTERCEPT_NT(manager, NtOpenKey, OPEN_KEY_ID, 16);
66 if (win_util::GetWinVersion() >= win_util::WINVERSION_WIN7) 66 if (base::win::GetVersion() >= base::win::VERSION_WIN7)
67 result &= INTERCEPT_NT(manager, NtOpenKeyEx, OPEN_KEY_EX_ID, 20); 67 result &= INTERCEPT_NT(manager, NtOpenKeyEx, OPEN_KEY_EX_ID, 20);
68 return result; 68 return result;
69 } 69 }
70 70
71 return false; 71 return false;
72 } 72 }
73 73
74 bool RegistryDispatcher::NtCreateKey( 74 bool RegistryDispatcher::NtCreateKey(
75 IPCInfo* ipc, std::wstring* name, DWORD attributes, HANDLE root, 75 IPCInfo* ipc, std::wstring* name, DWORD attributes, HANDLE root,
76 DWORD desired_access, DWORD title_index, DWORD create_options) { 76 DWORD desired_access, DWORD title_index, DWORD create_options) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 return true; 152 return true;
153 } 153 }
154 154
155 // Return operation status on the IPC. 155 // Return operation status on the IPC.
156 ipc->return_info.nt_status = nt_status; 156 ipc->return_info.nt_status = nt_status;
157 ipc->return_info.handle = handle; 157 ipc->return_info.handle = handle;
158 return true; 158 return true;
159 } 159 }
160 160
161 } // namespace sandbox 161 } // namespace sandbox
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698