Index: content/browser/quota_dispatcher_host.cc |
diff --git a/content/browser/quota_dispatcher_host.cc b/content/browser/quota_dispatcher_host.cc |
index 234eb5444c86ea76cbff55c180ec7677db87f770..8f2043bb4e427a117d50bf0fec0ac0fdcef1dcb4 100644 |
--- a/content/browser/quota_dispatcher_host.cc |
+++ b/content/browser/quota_dispatcher_host.cc |
@@ -4,6 +4,8 @@ |
#include "content/browser/quota_dispatcher_host.h" |
+#include <stdint.h> |
+ |
#include "base/bind.h" |
#include "base/memory/weak_ptr.h" |
#include "base/numerics/safe_conversions.h" |
@@ -84,8 +86,9 @@ class QuotaDispatcherHost::QueryUsageAndQuotaDispatcher |
} |
private: |
- void DidQueryStorageUsageAndQuota( |
- QuotaStatusCode status, int64 usage, int64 quota) { |
+ void DidQueryStorageUsageAndQuota(QuotaStatusCode status, |
+ int64_t usage, |
+ int64_t quota) { |
if (!dispatcher_host()) |
return; |
// crbug.com/349708 |
@@ -117,10 +120,11 @@ class QuotaDispatcherHost::RequestQuotaDispatcher |
current_quota_(0), |
requested_quota_(0), |
weak_factory_(this) { |
- // Convert the requested size from uint64 to int64 since the quota backend |
- // requires int64 values. |
- // TODO(nhiroki): The backend should accept uint64 values. |
- requested_quota_ = base::saturated_cast<int64>(params_.requested_size); |
+ // Convert the requested size from uint64_t to int64_t since the quota |
+ // backend |
+ // requires int64_t values. |
+ // TODO(nhiroki): The backend should accept uint64_t values. |
+ requested_quota_ = base::saturated_cast<int64_t>(params_.requested_size); |
} |
~RequestQuotaDispatcher() override {} |
@@ -146,8 +150,8 @@ class QuotaDispatcherHost::RequestQuotaDispatcher |
private: |
void DidGetPersistentUsageAndQuota(QuotaStatusCode status, |
- int64 usage, |
- int64 quota) { |
+ int64_t usage, |
+ int64_t quota) { |
if (!dispatcher_host()) |
return; |
if (status != storage::kQuotaStatusOk) { |
@@ -174,8 +178,8 @@ class QuotaDispatcherHost::RequestQuotaDispatcher |
} |
void DidGetTemporaryUsageAndQuota(QuotaStatusCode status, |
- int64 usage, |
- int64 quota) { |
+ int64_t usage, |
+ int64_t quota) { |
DidFinish(status, usage, std::min(requested_quota_, quota)); |
} |
@@ -194,13 +198,11 @@ class QuotaDispatcherHost::RequestQuotaDispatcher |
base::Bind(&self_type::DidSetHostQuota, weak_factory_.GetWeakPtr())); |
} |
- void DidSetHostQuota(QuotaStatusCode status, int64 new_quota) { |
+ void DidSetHostQuota(QuotaStatusCode status, int64_t new_quota) { |
DidFinish(status, current_usage_, new_quota); |
} |
- void DidFinish(QuotaStatusCode status, |
- int64 usage, |
- int64 granted_quota) { |
+ void DidFinish(QuotaStatusCode status, int64_t usage, int64_t granted_quota) { |
if (!dispatcher_host()) |
return; |
DCHECK(dispatcher_host()); |
@@ -214,9 +216,9 @@ class QuotaDispatcherHost::RequestQuotaDispatcher |
} |
StorageQuotaParams params_; |
- int64 current_usage_; |
- int64 current_quota_; |
- int64 requested_quota_; |
+ int64_t current_usage_; |
+ int64_t current_quota_; |
+ int64_t requested_quota_; |
base::WeakPtrFactory<self_type> weak_factory_; |
}; |