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

Unified Diff: sync/internal_api/sync_encryption_handler_impl_unittest.cc

Issue 1545553003: Switch to standard integer types in sync/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « sync/internal_api/sync_encryption_handler_impl.cc ('k') | sync/internal_api/sync_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/sync_encryption_handler_impl_unittest.cc
diff --git a/sync/internal_api/sync_encryption_handler_impl_unittest.cc b/sync/internal_api/sync_encryption_handler_impl_unittest.cc
index 7fd105b0409c71171d13eae5161fe00fa1b482f3..21ad3d7c3bfff2a04e8bc5085c211a6a824de0df 100644
--- a/sync/internal_api/sync_encryption_handler_impl_unittest.cc
+++ b/sync/internal_api/sync_encryption_handler_impl_unittest.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/sync_encryption_handler_impl.h"
+#include <stdint.h>
+
#include <string>
#include "base/base64.h"
@@ -146,10 +148,9 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test {
VerifyMigratedNigoriWithTimestamp(0, passphrase_type, passphrase);
}
- void VerifyMigratedNigoriWithTimestamp(
- int64 migration_time,
- PassphraseType passphrase_type,
- const std::string& passphrase) {
+ void VerifyMigratedNigoriWithTimestamp(int64_t migration_time,
+ PassphraseType passphrase_type,
+ const std::string& passphrase) {
ReadTransaction trans(FROM_HERE, user_share());
ReadNode nigori_node(&trans);
ASSERT_EQ(nigori_node.InitTypeRoot(NIGORI), BaseNode::INIT_OK);
@@ -196,7 +197,7 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test {
sync_pb::NigoriSpecifics BuildMigratedNigori(
PassphraseType passphrase_type,
- int64 migration_time,
+ int64_t migration_time,
const std::string& default_passphrase,
const std::string& keystore_key) {
DCHECK_NE(passphrase_type, IMPLICIT_PASSPHRASE);
@@ -239,7 +240,7 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test {
// Build a migrated nigori node with the specified default passphrase
// and keystore key and initialize the encryption handler with it.
- void InitKeystoreMigratedNigori(int64 migration_time,
+ void InitKeystoreMigratedNigori(int64_t migration_time,
const std::string& default_passphrase,
const std::string& keystore_key) {
{
@@ -273,7 +274,7 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test {
// Build a migrated nigori node with the specified default passphrase
// as a custom passphrase.
- void InitCustomPassMigratedNigori(int64 migration_time,
+ void InitCustomPassMigratedNigori(int64_t migration_time,
const std::string& default_passphrase) {
{
WriteTransaction trans(FROM_HERE, user_share());
@@ -344,7 +345,7 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test {
//
// |passphrase| is the custom passphrase.
void VerifyRestoreAfterCustomPassphrase(
- int64 migration_time,
+ int64_t migration_time,
const std::string& passphrase,
const std::string& bootstrap_token,
const SyncEncryptionHandler::NigoriState& nigori_state,
@@ -1338,7 +1339,7 @@ TEST_F(SyncEncryptionHandlerImplTest, ReceiveUnmigratedNigoriAfterMigration) {
GetCryptographer()->AddKey(cur_key);
// Build a migrated nigori with full encryption.
- const int64 migration_time = 1;
+ const int64_t migration_time = 1;
{
WriteTransaction trans(FROM_HERE, user_share());
WriteNode nigori_node(&trans);
@@ -1476,7 +1477,7 @@ TEST_F(SyncEncryptionHandlerImplTest, ReceiveOldMigratedNigori) {
EXPECT_CALL(*observer(), OnLocalSetPassphraseEncryption(_))
.WillOnce(testing::SaveArg<0>(&captured_nigori_state));
EXPECT_CALL(*observer(), OnEncryptionComplete());
- const int64 migration_time = 1;
+ const int64_t migration_time = 1;
{
WriteTransaction trans(FROM_HERE, user_share());
WriteNode nigori_node(&trans);
@@ -1616,7 +1617,7 @@ TEST_F(SyncEncryptionHandlerImplTest, SetCustomPassAfterMigration) {
// Build a nigori node with the generated keystore decryptor token and
// initialize the encryption handler with it. The cryptographer should be
// initialized properly to decrypt both kOldKey and kKeystoreKey.
- const int64 migration_time = 1;
+ const int64_t migration_time = 1;
{
WriteTransaction trans(FROM_HERE, user_share());
WriteNode nigori_node(&trans);
@@ -1733,7 +1734,7 @@ TEST_F(SyncEncryptionHandlerImplTest,
// Build a nigori node with the generated keystore decryptor token and
// initialize the encryption handler with it. The cryptographer will have
// pending keys until we provide the decryption passphrase.
- const int64 migration_time = 1;
+ const int64_t migration_time = 1;
{
WriteTransaction trans(FROM_HERE, user_share());
WriteNode nigori_node(&trans);
@@ -1947,7 +1948,7 @@ TEST_F(SyncEncryptionHandlerImplTest,
// Build a nigori node with the generated keystore decryptor token and
// initialize the encryption handler with it. The cryptographer will have
// pending keys until we provide the decryption passphrase.
- const int64 migration_time = 1;
+ const int64_t migration_time = 1;
{
WriteTransaction trans(FROM_HERE, user_share());
WriteNode nigori_node(&trans);
@@ -2414,7 +2415,7 @@ TEST_F(SyncEncryptionHandlerImplTest, RotateKeysMigratedCustomPassphrase) {
KeyParams custom_key = {"localhost", "dummy", kCustomPass};
GetCryptographer()->AddKey(custom_key);
- const int64 migration_time = 1;
+ const int64_t migration_time = 1;
InitCustomPassMigratedNigori(migration_time, kCustomPass);
VerifyMigratedNigoriWithTimestamp(migration_time, CUSTOM_PASSPHRASE,
kCustomPass);
« no previous file with comments | « sync/internal_api/sync_encryption_handler_impl.cc ('k') | sync/internal_api/sync_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698