Index: sandbox/win/src/policy_low_level.cc |
diff --git a/sandbox/win/src/policy_low_level.cc b/sandbox/win/src/policy_low_level.cc |
index 526b23d6b0136340e973d677964fef07d0604554..739321ca07bb120f75f44c4697ffa8e09de8c5e3 100644 |
--- a/sandbox/win/src/policy_low_level.cc |
+++ b/sandbox/win/src/policy_low_level.cc |
@@ -4,11 +4,10 @@ |
#include "sandbox/win/src/policy_low_level.h" |
-#include <stddef.h> |
-#include <stdint.h> |
- |
+#include <string> |
#include <map> |
-#include <string> |
+ |
+#include "base/basictypes.h" |
namespace { |
@@ -24,11 +23,11 @@ |
// The category of the last character seen by the string matching opcode |
// generator. |
- const uint32_t kLastCharIsNone = 0; |
- const uint32_t kLastCharIsAlpha = 1; |
- const uint32_t kLastCharIsWild = 2; |
- const uint32_t kLastCharIsAsterisk = kLastCharIsWild + 4; |
- const uint32_t kLastCharIsQuestionM = kLastCharIsWild + 8; |
+ const uint32 kLastCharIsNone = 0; |
+ const uint32 kLastCharIsAlpha = 1; |
+ const uint32 kLastCharIsWild = 2; |
+ const uint32 kLastCharIsAsterisk = kLastCharIsWild + 4; |
+ const uint32 kLastCharIsQuestionM = kLastCharIsWild + 8; |
} |
namespace sandbox { |
@@ -69,7 +68,7 @@ |
bool LowLevelPolicy::Done() { |
typedef std::list<RuleNode> RuleNodes; |
typedef std::list<const PolicyRule*> RuleList; |
- typedef std::map<uint32_t, RuleList> Mmap; |
+ typedef std::map<uint32, RuleList> Mmap; |
Mmap mmap; |
for (RuleNodes::iterator it = rules_.begin(); it != rules_.end(); ++it) { |
@@ -82,7 +81,7 @@ |
size_t avail_size = policy_store_->data_size; |
for (Mmap::iterator it = mmap.begin(); it != mmap.end(); ++it) { |
- uint32_t service = (*it).first; |
+ uint32 service = (*it).first; |
if (service >= kMaxServiceCount) { |
return false; |
} |
@@ -156,16 +155,14 @@ |
// to zero. |
bool PolicyRule::GenStringOpcode(RuleType rule_type, |
StringMatchOptions match_opts, |
- uint16_t parameter, |
- int state, |
- bool last_call, |
- int* skip_count, |
- base::string16* fragment) { |
+ uint16 parameter, int state, bool last_call, |
+ int* skip_count, base::string16* fragment) { |
+ |
// The last opcode must: |
// 1) Always clear the context. |
// 2) Preserve the negation. |
// 3) Remove the 'OR' mode flag. |
- uint32_t options = kPolNone; |
+ uint32 options = kPolNone; |
if (last_call) { |
if (IF_NOT == rule_type) { |
options = kPolClearContext | kPolNegateEval; |
@@ -222,8 +219,7 @@ |
return true; |
} |
-bool PolicyRule::AddStringMatch(RuleType rule_type, |
- int16_t parameter, |
+bool PolicyRule::AddStringMatch(RuleType rule_type, int16 parameter, |
const wchar_t* string, |
StringMatchOptions match_opts) { |
if (done_) { |
@@ -232,7 +228,7 @@ |
} |
const wchar_t* current_char = string; |
- uint32_t last_char = kLastCharIsNone; |
+ uint32 last_char = kLastCharIsNone; |
int state = PENDING_NONE; |
int skip_count = 0; // counts how many '?' we have seen in a row. |
base::string16 fragment; // accumulates the non-wildcard part. |
@@ -284,14 +280,14 @@ |
} |
bool PolicyRule::AddNumberMatch(RuleType rule_type, |
- int16_t parameter, |
- uint32_t number, |
+ int16 parameter, |
+ uint32 number, |
RuleOp comparison_op) { |
if (done_) { |
// Do not allow to add more rules after generating the action opcode. |
return false; |
} |
- uint32_t opts = (rule_type == IF_NOT) ? kPolNegateEval : kPolNone; |
+ uint32 opts = (rule_type == IF_NOT)? kPolNegateEval : kPolNone; |
if (EQUAL == comparison_op) { |
if (NULL == opcode_factory_->MakeOpNumberMatch(parameter, number, opts)) { |