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

Unified Diff: content/browser/quota/mock_quota_manager.cc

Issue 1498003003: Remove kint64max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: INT64_MAX 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/mock_quota_manager.h ('k') | content/browser/quota/mock_quota_manager_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/quota/mock_quota_manager.cc
diff --git a/content/browser/quota/mock_quota_manager.cc b/content/browser/quota/mock_quota_manager.cc
index 47bc304537e4e8ee78bc644316f65e45e85923ef..90674081e0c4caec1b46e8ebb978ccb311b84495 100644
--- a/content/browser/quota/mock_quota_manager.cc
+++ b/content/browser/quota/mock_quota_manager.cc
@@ -4,6 +4,8 @@
#include "content/browser/quota/mock_quota_manager.h"
+#include <limits>
+
#include "base/location.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -28,7 +30,8 @@ MockQuotaManager::OriginInfo::OriginInfo(
MockQuotaManager::OriginInfo::~OriginInfo() {}
-MockQuotaManager::StorageInfo::StorageInfo() : usage(0), quota(kint64max) {}
+MockQuotaManager::StorageInfo::StorageInfo()
+ : usage(0), quota(std::numeric_limits<int64_t>::max()) {}
MockQuotaManager::StorageInfo::~StorageInfo() {}
MockQuotaManager::MockQuotaManager(
@@ -53,8 +56,9 @@ void MockQuotaManager::GetUsageAndQuota(
callback.Run(storage::kQuotaStatusOk, info.usage, info.quota);
}
-void MockQuotaManager::SetQuota(const GURL& origin, StorageType type,
- int64 quota) {
+void MockQuotaManager::SetQuota(const GURL& origin,
+ StorageType type,
+ int64_t quota) {
usage_and_quota_map_[std::make_pair(origin, type)].quota = quota;
}
@@ -125,8 +129,9 @@ void MockQuotaManager::DeleteOriginData(
MockQuotaManager::~MockQuotaManager() {}
-void MockQuotaManager::UpdateUsage(
- const GURL& origin, StorageType type, int64 delta) {
+void MockQuotaManager::UpdateUsage(const GURL& origin,
+ StorageType type,
+ int64_t delta) {
usage_and_quota_map_[std::make_pair(origin, type)].usage += delta;
}
« no previous file with comments | « content/browser/quota/mock_quota_manager.h ('k') | content/browser/quota/mock_quota_manager_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698