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

Unified Diff: content/browser/dom_storage/session_storage_database.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
Index: content/browser/dom_storage/session_storage_database.cc
diff --git a/content/browser/dom_storage/session_storage_database.cc b/content/browser/dom_storage/session_storage_database.cc
index d0ab442238b5817b48761a8267e5858002ba420d..ec246164e3404561df14a267ada5c019bd5ba941 100644
--- a/content/browser/dom_storage/session_storage_database.cc
+++ b/content/browser/dom_storage/session_storage_database.cc
@@ -4,6 +4,8 @@
#include "content/browser/dom_storage/session_storage_database.h"
+#include <stddef.h>
+
#include <vector>
#include "base/files/file_util.h"
@@ -148,7 +150,7 @@ bool SessionStorageDatabase::CommitAreaChanges(
&exists, &map_id))
return false;
if (exists) {
- int64 ref_count;
+ int64_t ref_count;
if (!GetMapRefCount(map_id, &ref_count))
return false;
if (ref_count > 1) {
@@ -535,7 +537,7 @@ bool SessionStorageDatabase::CreateMapForArea(const std::string& namespace_id,
leveldb::Status s = db_->Get(leveldb::ReadOptions(), next_map_id_key, map_id);
if (!DatabaseErrorCheck(s.ok() || s.IsNotFound()))
return false;
- int64 next_map_id = 0;
+ int64_t next_map_id = 0;
if (s.IsNotFound()) {
*map_id = "0";
} else {
@@ -610,7 +612,7 @@ void SessionStorageDatabase::WriteValuesToMap(const std::string& map_id,
}
bool SessionStorageDatabase::GetMapRefCount(const std::string& map_id,
- int64* ref_count) {
+ int64_t* ref_count) {
std::string ref_count_string;
leveldb::Status s = db_->Get(leveldb::ReadOptions(),
MapRefCountKey(map_id), &ref_count_string);
@@ -623,7 +625,7 @@ bool SessionStorageDatabase::GetMapRefCount(const std::string& map_id,
bool SessionStorageDatabase::IncreaseMapRefCount(const std::string& map_id,
leveldb::WriteBatch* batch) {
// Increase the ref count for the map.
- int64 old_ref_count;
+ int64_t old_ref_count;
if (!GetMapRefCount(map_id, &old_ref_count))
return false;
batch->Put(MapRefCountKey(map_id), base::Int64ToString(++old_ref_count));
@@ -634,7 +636,7 @@ bool SessionStorageDatabase::DecreaseMapRefCount(const std::string& map_id,
int decrease,
leveldb::WriteBatch* batch) {
// Decrease the ref count for the map.
- int64 ref_count;
+ int64_t ref_count;
if (!GetMapRefCount(map_id, &ref_count))
return false;
if (!ConsistencyCheck(decrease <= ref_count))
« no previous file with comments | « content/browser/dom_storage/session_storage_database.h ('k') | content/browser/dom_storage/session_storage_database_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698