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

Unified Diff: content/browser/quota_dispatcher_host.cc

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 | « content/browser/quota_dispatcher_host.h ('k') | content/browser/resource_context_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
};
« no previous file with comments | « content/browser/quota_dispatcher_host.h ('k') | content/browser/resource_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698