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

Unified Diff: sandbox/win/src/registry_policy.cc

Issue 1538283002: Switch to standard integer types in sandbox/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: macros Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/win/src/registry_policy.h ('k') | sandbox/win/src/resolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/registry_policy.cc
diff --git a/sandbox/win/src/registry_policy.cc b/sandbox/win/src/registry_policy.cc
index 58e4e203970fbb405cdffd20b8c460f1e8f14abd..ec66380814250d00d50a5db1792162ba2979b9ec 100644
--- a/sandbox/win/src/registry_policy.cc
+++ b/sandbox/win/src/registry_policy.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
#include <string>
#include "sandbox/win/src/registry_policy.h"
@@ -10,13 +12,13 @@
#include "sandbox/win/src/ipc_tags.h"
#include "sandbox/win/src/policy_engine_opcodes.h"
#include "sandbox/win/src/policy_params.h"
-#include "sandbox/win/src/sandbox_utils.h"
#include "sandbox/win/src/sandbox_types.h"
+#include "sandbox/win/src/sandbox_utils.h"
#include "sandbox/win/src/win_utils.h"
namespace {
-static const uint32 kAllowedRegFlags =
+static const uint32_t kAllowedRegFlags =
KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY | KEY_READ |
GENERIC_READ | GENERIC_EXECUTE | READ_CONTROL;
@@ -137,7 +139,7 @@ bool RegistryPolicy::GenerateRules(const wchar_t* name,
// We consider all flags that are not known to be readonly as potentially
// used for write. Here we also support MAXIMUM_ALLOWED, but we are going
// to expand it to read-only before the call.
- uint32 restricted_flags = ~(kAllowedRegFlags | MAXIMUM_ALLOWED);
+ uint32_t restricted_flags = ~(kAllowedRegFlags | MAXIMUM_ALLOWED);
open.AddNumberMatch(IF_NOT, OpenKey::ACCESS, restricted_flags, AND);
create.AddNumberMatch(IF_NOT, OpenKey::ACCESS, restricted_flags, AND);
break;
@@ -166,12 +168,12 @@ bool RegistryPolicy::GenerateRules(const wchar_t* name,
bool RegistryPolicy::CreateKeyAction(EvalResult eval_result,
const ClientInfo& client_info,
- const base::string16 &key,
- uint32 attributes,
+ const base::string16& key,
+ uint32_t attributes,
HANDLE root_directory,
- uint32 desired_access,
- uint32 title_index,
- uint32 create_options,
+ uint32_t desired_access,
+ uint32_t title_index,
+ uint32_t create_options,
HANDLE* handle,
NTSTATUS* nt_status,
ULONG* disposition) {
@@ -200,10 +202,10 @@ bool RegistryPolicy::CreateKeyAction(EvalResult eval_result,
bool RegistryPolicy::OpenKeyAction(EvalResult eval_result,
const ClientInfo& client_info,
- const base::string16 &key,
- uint32 attributes,
+ const base::string16& key,
+ uint32_t attributes,
HANDLE root_directory,
- uint32 desired_access,
+ uint32_t desired_access,
HANDLE* handle,
NTSTATUS* nt_status) {
// The only action supported is ASK_BROKER which means open the requested
« no previous file with comments | « sandbox/win/src/registry_policy.h ('k') | sandbox/win/src/resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698