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

Unified Diff: sandbox/win/src/policy_low_level.h

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/policy_engine_unittest.cc ('k') | sandbox/win/src/policy_low_level.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/policy_low_level.h
diff --git a/sandbox/win/src/policy_low_level.h b/sandbox/win/src/policy_low_level.h
index 6a62631311730d3585c59cd75267034a86e6655c..f77787c7723cfefba0158461aea476b8adc005ef 100644
--- a/sandbox/win/src/policy_low_level.h
+++ b/sandbox/win/src/policy_low_level.h
@@ -5,13 +5,16 @@
#ifndef SANDBOX_SRC_POLICY_LOW_LEVEL_H__
#define SANDBOX_SRC_POLICY_LOW_LEVEL_H__
+#include <stddef.h>
+#include <stdint.h>
+
#include <list>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/strings/string16.h"
#include "sandbox/win/src/ipc_tags.h"
-#include "sandbox/win/src/policy_engine_params.h"
#include "sandbox/win/src/policy_engine_opcodes.h"
+#include "sandbox/win/src/policy_engine_params.h"
// Low level policy classes.
// Built on top of the PolicyOpcode and OpcodeFatory, the low level policy
@@ -136,8 +139,10 @@ class PolicyRule {
// in a 'create file' service the file name argument can be at index 0.
// string: is the desired matching pattern.
// match_opts: if the pattern matching is case sensitive or not.
- bool AddStringMatch(RuleType rule_type, int16 parameter,
- const wchar_t* string, StringMatchOptions match_opts);
+ bool AddStringMatch(RuleType rule_type,
+ int16_t parameter,
+ const wchar_t* string,
+ StringMatchOptions match_opts);
// Adds a number match comparison to the rule.
// rule_type: possible values are IF and IF_NOT.
@@ -145,8 +150,8 @@ class PolicyRule {
// number: the value to compare the input to.
// comparison_op: the comparison kind (equal, logical and, etc).
bool AddNumberMatch(RuleType rule_type,
- int16 parameter,
- uint32 number,
+ int16_t parameter,
+ uint32_t number,
RuleOp comparison_op);
// Returns the number of opcodes generated so far.
@@ -163,9 +168,13 @@ class PolicyRule {
// Called in a loop from AddStringMatch to generate the required string
// match opcodes. rule_type, match_opts and parameter are the same as
// in AddStringMatch.
- bool GenStringOpcode(RuleType rule_type, StringMatchOptions match_opts,
- uint16 parameter, int state, bool last_call,
- int* skip_count, base::string16* fragment);
+ bool GenStringOpcode(RuleType rule_type,
+ StringMatchOptions match_opts,
+ uint16_t parameter,
+ int state,
+ bool last_call,
+ int* skip_count,
+ base::string16* fragment);
// Loop over all generated opcodes and copy them to increasing memory
// addresses from opcode_start and copy the extra data (strings usually) into
« no previous file with comments | « sandbox/win/src/policy_engine_unittest.cc ('k') | sandbox/win/src/policy_low_level.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698