Commit d52e8fb2 authored by Jared Saul's avatar Jared Saul Committed by Commit Bot

[AF] Update banned long long to int64_t

Change-Id: Id13b46e08df385dc3e3107671259d9330ad79153
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1931758
Auto-Submit: Jared Saul <jsaul@google.com>
Commit-Queue: Siyu An <siyua@chromium.org>
Reviewed-by: default avatarSiyu An <siyua@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719350}
parent de5ca861
......@@ -24,9 +24,9 @@ int CreditCardSaveStrikeDatabase::GetMaxStrikesLimit() {
return 3;
}
long long CreditCardSaveStrikeDatabase::GetExpiryTimeMicros() {
int64_t CreditCardSaveStrikeDatabase::GetExpiryTimeMicros() {
// Expiry time is 6 months.
return (long long)1000000 * 60 * 60 * 24 * 180;
return (int64_t)1000000 * 60 * 60 * 24 * 180;
}
bool CreditCardSaveStrikeDatabase::UniqueIdsRequired() {
......
......@@ -5,6 +5,7 @@
#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_CREDIT_CARD_SAVE_STRIKE_DATABASE_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_CREDIT_CARD_SAVE_STRIKE_DATABASE_H_
#include <stdint.h>
#include <string>
#include "components/autofill/core/browser/payments/strike_database.h"
......@@ -21,7 +22,7 @@ class CreditCardSaveStrikeDatabase : public StrikeDatabaseIntegratorBase {
std::string GetProjectPrefix() override;
int GetMaxStrikesLimit() override;
long long GetExpiryTimeMicros() override;
int64_t GetExpiryTimeMicros() override;
bool UniqueIdsRequired() override;
};
......
......@@ -30,9 +30,9 @@ int FidoAuthenticationStrikeDatabase::GetMaxStrikesLimit() {
return 3;
}
long long FidoAuthenticationStrikeDatabase::GetExpiryTimeMicros() {
int64_t FidoAuthenticationStrikeDatabase::GetExpiryTimeMicros() {
// Expiry time is six months.
return 1000000LL * 60 * 60 * 24 * 30 * 6;
return (int64_t)1000000 * 60 * 60 * 24 * 30 * 6;
}
bool FidoAuthenticationStrikeDatabase::UniqueIdsRequired() {
......
......@@ -5,6 +5,7 @@
#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_FIDO_AUTHENTICATION_STRIKE_DATABASE_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_FIDO_AUTHENTICATION_STRIKE_DATABASE_H_
#include <stdint.h>
#include <string>
#include "components/autofill/core/browser/payments/strike_database.h"
......@@ -29,7 +30,7 @@ class FidoAuthenticationStrikeDatabase : public StrikeDatabaseIntegratorBase {
std::string GetProjectPrefix() override;
int GetMaxStrikesLimit() override;
long long GetExpiryTimeMicros() override;
int64_t GetExpiryTimeMicros() override;
bool UniqueIdsRequired() override;
};
......
......@@ -31,9 +31,9 @@ int LocalCardMigrationStrikeDatabase::GetMaxStrikesLimit() {
return 6;
}
long long LocalCardMigrationStrikeDatabase::GetExpiryTimeMicros() {
int64_t LocalCardMigrationStrikeDatabase::GetExpiryTimeMicros() {
// Expiry time is 1 year.
return (long long)1000000 * 60 * 60 * 24 * 365;
return (int64_t)1000000 * 60 * 60 * 24 * 365;
}
bool LocalCardMigrationStrikeDatabase::UniqueIdsRequired() {
......
......@@ -5,6 +5,7 @@
#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_LOCAL_CARD_MIGRATION_STRIKE_DATABASE_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_LOCAL_CARD_MIGRATION_STRIKE_DATABASE_H_
#include <stdint.h>
#include <string>
#include "components/autofill/core/browser/payments/strike_database.h"
......@@ -30,7 +31,7 @@ class LocalCardMigrationStrikeDatabase : public StrikeDatabaseIntegratorBase {
std::string GetProjectPrefix() override;
int GetMaxStrikesLimit() override;
long long GetExpiryTimeMicros() override;
int64_t GetExpiryTimeMicros() override;
bool UniqueIdsRequired() override;
};
......
......@@ -5,6 +5,8 @@
#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_STRIKE_DATABASE_INTEGRATOR_BASE_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_STRIKE_DATABASE_INTEGRATOR_BASE_H_
#include <stdint.h>
#include "components/autofill/core/browser/payments/strike_database.h"
namespace autofill {
......@@ -95,7 +97,7 @@ class StrikeDatabaseIntegratorBase {
virtual int GetMaxStrikesLimit() = 0;
// Returns the time after which the most recent strike should expire.
virtual long long GetExpiryTimeMicros() = 0;
virtual int64_t GetExpiryTimeMicros() = 0;
// Returns whether or not a unique string identifier is required for every
// strike in this project.
......
......@@ -10,8 +10,6 @@ namespace autofill {
const char kProjectPrefix[] = "StrikeDatabaseIntegratorTest";
const int kMaxStrikesLimit = 6;
// Expiry time is 1 year.
const long long kExpiryTimeMicros = (long long)1000000 * 60 * 60 * 24 * 365;
StrikeDatabaseIntegratorTestStrikeDatabase::
StrikeDatabaseIntegratorTestStrikeDatabase(StrikeDatabase* strike_database)
......@@ -30,8 +28,9 @@ int StrikeDatabaseIntegratorTestStrikeDatabase::GetMaxStrikesLimit() {
return kMaxStrikesLimit;
}
long long StrikeDatabaseIntegratorTestStrikeDatabase::GetExpiryTimeMicros() {
return kExpiryTimeMicros;
int64_t StrikeDatabaseIntegratorTestStrikeDatabase::GetExpiryTimeMicros() {
// Expiry time is 1 year.
return (int64_t)1000000 * 60 * 60 * 24 * 365;
}
bool StrikeDatabaseIntegratorTestStrikeDatabase::UniqueIdsRequired() {
......
......@@ -5,6 +5,7 @@
#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_STRIKE_DATABASE_INTEGRATOR_TEST_STRIKE_DATABASE_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_PAYMENTS_STRIKE_DATABASE_INTEGRATOR_TEST_STRIKE_DATABASE_H_
#include <stdint.h>
#include <string>
#include "components/autofill/core/browser/payments/strike_database.h"
......@@ -22,7 +23,7 @@ class StrikeDatabaseIntegratorTestStrikeDatabase
std::string GetProjectPrefix() override;
int GetMaxStrikesLimit() override;
long long GetExpiryTimeMicros() override;
int64_t GetExpiryTimeMicros() override;
bool UniqueIdsRequired() override;
void SetUniqueIdsRequired(bool unique_ids_required);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment