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

Unified Diff: sync/engine/apply_control_data_updates_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/engine/apply_control_data_updates.cc ('k') | sync/engine/backoff_delay_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/apply_control_data_updates_unittest.cc
diff --git a/sync/engine/apply_control_data_updates_unittest.cc b/sync/engine/apply_control_data_updates_unittest.cc
index 405ae0e79e1a36dbc72ad29894d3c5cde673e81f..505678f89079297ccf1144825fb7a69ccefdab0c 100644
--- a/sync/engine/apply_control_data_updates_unittest.cc
+++ b/sync/engine/apply_control_data_updates_unittest.cc
@@ -4,10 +4,14 @@
#include "sync/engine/apply_control_data_updates.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include "base/format_macros.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/stringprintf.h"
@@ -330,10 +334,8 @@ TEST_F(ApplyControlDataUpdatesTest,
other_cryptographer.GetKeys(server_nigori->mutable_encryption_keybag());
server_nigori->set_encrypt_everything(true);
server_nigori->set_keybag_is_frozen(true);
- int64 nigori_handle =
- entry_factory_->CreateUnappliedNewItem(kNigoriTag,
- server_specifics,
- true);
+ int64_t nigori_handle = entry_factory_->CreateUnappliedNewItem(
+ kNigoriTag, server_specifics, true);
// Initialize the local cryptographer with the local keys.
cryptographer->AddKey(local_params);
@@ -408,10 +410,8 @@ TEST_F(ApplyControlDataUpdatesTest,
other_cryptographer.GetKeys(server_nigori->mutable_encryption_keybag());
server_nigori->set_encrypt_everything(false);
server_nigori->set_keybag_is_frozen(false);
- int64 nigori_handle =
- entry_factory_->CreateUnappliedNewItem(kNigoriTag,
- server_specifics,
- true);
+ int64_t nigori_handle = entry_factory_->CreateUnappliedNewItem(
+ kNigoriTag, server_specifics, true);
// Initialize the local cryptographer with the local keys.
cryptographer->AddKey(local_params);
@@ -483,10 +483,8 @@ TEST_F(ApplyControlDataUpdatesTest,
sync_pb::NigoriSpecifics* server_nigori = server_specifics.mutable_nigori();
cryptographer->GetKeys(server_nigori->mutable_encryption_keybag());
server_nigori->set_encrypt_everything(true);
- int64 nigori_handle =
- entry_factory_->CreateUnappliedNewItem(kNigoriTag,
- server_specifics,
- true);
+ int64_t nigori_handle = entry_factory_->CreateUnappliedNewItem(
+ kNigoriTag, server_specifics, true);
// Add the new keys to the cryptogrpaher
cryptographer->AddKey(new_params);
@@ -558,10 +556,8 @@ TEST_F(ApplyControlDataUpdatesTest,
server_nigori->set_passphrase_type(
sync_pb::NigoriSpecifics::KEYSTORE_PASSPHRASE);
server_nigori->mutable_keystore_decryptor_token();
- int64 nigori_handle =
- entry_factory_->CreateUnappliedNewItem(kNigoriTag,
- server_specifics,
- true);
+ int64_t nigori_handle = entry_factory_->CreateUnappliedNewItem(
+ kNigoriTag, server_specifics, true);
// Add the new keys to the cryptographer.
cryptographer->AddKey(old_params);
@@ -640,10 +636,8 @@ TEST_F(ApplyControlDataUpdatesTest,
server_nigori->set_keybag_is_frozen(true);
server_nigori->set_passphrase_type(
sync_pb::NigoriSpecifics::CUSTOM_PASSPHRASE);
- int64 nigori_handle =
- entry_factory_->CreateUnappliedNewItem(kNigoriTag,
- server_specifics,
- true);
+ int64_t nigori_handle = entry_factory_->CreateUnappliedNewItem(
+ kNigoriTag, server_specifics, true);
// Add the old keys to the cryptographer.
cryptographer->AddKey(old_params);
@@ -720,10 +714,8 @@ TEST_F(ApplyControlDataUpdatesTest,
other_cryptographer.GetKeys(server_nigori->mutable_encryption_keybag());
server_nigori->set_encrypt_everything(true);
server_nigori->set_keybag_is_frozen(false);
- int64 nigori_handle =
- entry_factory_->CreateUnappliedNewItem(kNigoriTag,
- server_specifics,
- true);
+ int64_t nigori_handle = entry_factory_->CreateUnappliedNewItem(
+ kNigoriTag, server_specifics, true);
// Add the old keys to the cryptographer.
cryptographer->AddKey(old_params);
@@ -802,10 +794,8 @@ TEST_F(ApplyControlDataUpdatesTest,
server_nigori->set_passphrase_type(
sync_pb::NigoriSpecifics::KEYSTORE_PASSPHRASE);
server_nigori->mutable_keystore_decryptor_token();
- int64 nigori_handle =
- entry_factory_->CreateUnappliedNewItem(kNigoriTag,
- server_specifics,
- true);
+ int64_t nigori_handle = entry_factory_->CreateUnappliedNewItem(
+ kNigoriTag, server_specifics, true);
// Add the old keys to the cryptographer.
cryptographer->AddKey(old_params);
@@ -864,8 +854,8 @@ TEST_F(ApplyControlDataUpdatesTest, ControlApply) {
sync_pb::EntitySpecifics specifics;
specifics.mutable_experiments()->mutable_keystore_encryption()->
set_enabled(true);
- int64 experiment_handle = entry_factory_->CreateUnappliedNewItem(
- experiment_id, specifics, false);
+ int64_t experiment_handle =
+ entry_factory_->CreateUnappliedNewItem(experiment_id, specifics, false);
ApplyControlDataUpdates(directory());
EXPECT_FALSE(entry_factory_->GetIsUnappliedForItem(experiment_handle));
@@ -881,10 +871,10 @@ TEST_F(ApplyControlDataUpdatesTest, ControlApplyParentBeforeChild) {
sync_pb::EntitySpecifics specifics;
specifics.mutable_experiments()->mutable_keystore_encryption()->
set_enabled(true);
- int64 experiment_handle = entry_factory_->CreateUnappliedNewItemWithParent(
+ int64_t experiment_handle = entry_factory_->CreateUnappliedNewItemWithParent(
experiment_id, specifics, parent_id);
- int64 parent_handle = entry_factory_->CreateUnappliedNewItem(
- parent_id, specifics, true);
+ int64_t parent_handle =
+ entry_factory_->CreateUnappliedNewItem(parent_id, specifics, true);
ApplyControlDataUpdates(directory());
EXPECT_FALSE(entry_factory_->GetIsUnappliedForItem(parent_handle));
@@ -903,8 +893,8 @@ TEST_F(ApplyControlDataUpdatesTest, ControlConflict) {
set_enabled(true);
local_specifics.mutable_experiments()->mutable_keystore_encryption()->
set_enabled(false);
- int64 experiment_handle = entry_factory_->CreateSyncedItem(
- experiment_id, EXPERIMENTS, false);
+ int64_t experiment_handle =
+ entry_factory_->CreateSyncedItem(experiment_id, EXPERIMENTS, false);
entry_factory_->SetServerSpecificsForItem(experiment_handle,
server_specifics);
entry_factory_->SetLocalSpecificsForItem(experiment_handle,
« no previous file with comments | « sync/engine/apply_control_data_updates.cc ('k') | sync/engine/backoff_delay_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698