diff options
| author | avi <avi@chromium.org> | 2015-12-25 18:10:43 -0800 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2015-12-26 02:11:32 +0000 |
| commit | b896c715dd14ec1f7ac800350b40eeb6de2ba868 (patch) | |
| tree | acc471478046a775c3492046a40c2ea84e8ea88a /chrome/browser/safe_browsing/safe_browsing_store_unittest.cc | |
| parent | f5b61be8a18b07a2a928f10bf1f8f0e8a5358f13 (diff) | |
| download | chromium_src-b896c715dd14ec1f7ac800350b40eeb6de2ba868.zip chromium_src-b896c715dd14ec1f7ac800350b40eeb6de2ba868.tar.gz chromium_src-b896c715dd14ec1f7ac800350b40eeb6de2ba868.tar.bz2 | |
Switch to standard integer types in chrome/browser/, part 3 of 4.
BUG=138542
TBR=thakis@chromium.org
Review URL: https://codereview.chromium.org/1548133002
Cr-Commit-Position: refs/heads/master@{#366883}
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_store_unittest.cc')
| -rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_store_unittest.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_store_unittest.cc index 50233c4..2814cb8 100644 --- a/chrome/browser/safe_browsing/safe_browsing_store_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_store_unittest.cc @@ -2,6 +2,9 @@ // 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.h> + #include "chrome/browser/safe_browsing/safe_browsing_store.h" #include "components/safe_browsing_db/util.h" @@ -41,8 +44,8 @@ void ProcessHelper(SBAddPrefixes* add_prefixes, SBSubPrefixes* sub_prefixes, std::vector<SBAddFullHash>* add_full_hashes, std::vector<SBSubFullHash>* sub_full_hashes, - const base::hash_set<int32>& add_chunks_deleted, - const base::hash_set<int32>& sub_chunks_deleted) { + const base::hash_set<int32_t>& add_chunks_deleted, + const base::hash_set<int32_t>& sub_chunks_deleted) { std::sort(add_prefixes->begin(), add_prefixes->end(), SBAddPrefixLess<SBAddPrefix,SBAddPrefix>); std::sort(sub_prefixes->begin(), sub_prefixes->end(), @@ -166,7 +169,7 @@ TEST(SafeBrowsingStoreTest, SBProcessSubsEmpty) { SBSubPrefixes sub_prefixes; std::vector<SBSubFullHash> sub_hashes; - const base::hash_set<int32> no_deletions; + const base::hash_set<int32_t> no_deletions; SBProcessSubs(&add_prefixes, &sub_prefixes, &add_hashes, &sub_hashes, no_deletions, no_deletions); EXPECT_TRUE(add_prefixes.empty()); @@ -212,7 +215,7 @@ TEST(SafeBrowsingStoreTest, SBProcessSubsKnockout) { add_hashes.push_back(SBAddFullHash(kAddChunk5, kHash4mod)); sub_hashes.push_back(SBSubFullHash(kSubChunk5, kAddChunk5, kHash4mod)); - const base::hash_set<int32> no_deletions; + const base::hash_set<int32_t> no_deletions; ProcessHelper(&add_prefixes, &sub_prefixes, &add_hashes, &sub_hashes, no_deletions, no_deletions); @@ -267,8 +270,8 @@ TEST(SafeBrowsingStoreTest, SBProcessSubsDeleteChunk) { sub_prefixes.push_back(SBSubPrefix(kSubChunk1, kAddChunk1, kHash3.prefix)); // Subs apply before being deleted. - const base::hash_set<int32> no_deletions; - base::hash_set<int32> sub_deletions; + const base::hash_set<int32_t> no_deletions; + base::hash_set<int32_t> sub_deletions; sub_deletions.insert(kSubChunk1); ProcessHelper(&add_prefixes, &sub_prefixes, &add_hashes, &sub_hashes, no_deletions, sub_deletions); @@ -285,7 +288,7 @@ TEST(SafeBrowsingStoreTest, SBProcessSubsDeleteChunk) { EXPECT_TRUE(sub_hashes.empty()); // Delete the adds, also. - base::hash_set<int32> add_deletions; + base::hash_set<int32_t> add_deletions; add_deletions.insert(kAddChunk1); ProcessHelper(&add_prefixes, &sub_prefixes, &add_hashes, &sub_hashes, add_deletions, no_deletions); @@ -301,8 +304,8 @@ TEST(SafeBrowsingStoreTest, Y2K38) { const base::Time future = now + base::TimeDelta::FromDays(3*365); // TODO: Fix file format before 2035. - EXPECT_GT(static_cast<int32>(future.ToTimeT()), 0) - << " (int32)time_t is running out."; + EXPECT_GT(static_cast<int32_t>(future.ToTimeT()), 0) + << " (int32_t)time_t is running out."; } } // namespace safe_browsing |
