Index: content/browser/database_tracker_unittest.cc |
diff --git a/content/browser/database_tracker_unittest.cc b/content/browser/database_tracker_unittest.cc |
index a068b4d5d27989ba70c56a5245753aa8476e564b..189257f1a199fe9e25c91bcf603e9ecfabd1cdeb 100644 |
--- a/content/browser/database_tracker_unittest.cc |
+++ b/content/browser/database_tracker_unittest.cc |
@@ -2,6 +2,9 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include <stddef.h> |
+#include <stdint.h> |
+ |
#include "base/files/file.h" |
#include "base/files/file_path.h" |
#include "base/files/file_util.h" |
@@ -46,7 +49,7 @@ class TestObserver : public storage::DatabaseTracker::Observer { |
~TestObserver() override {} |
void OnDatabaseSizeChanged(const std::string& origin_identifier, |
const base::string16& database_name, |
- int64 database_size) override { |
+ int64_t database_size) override { |
if (!observe_size_changes_) |
return; |
new_notification_received_ = true; |
@@ -72,7 +75,7 @@ class TestObserver : public storage::DatabaseTracker::Observer { |
return origin_identifier_; |
} |
base::string16 GetNotificationDatabaseName() { return database_name_; } |
- int64 GetNotificationDatabaseSize() { return database_size_; } |
+ int64_t GetNotificationDatabaseSize() { return database_size_; } |
private: |
bool new_notification_received_; |
@@ -80,13 +83,13 @@ class TestObserver : public storage::DatabaseTracker::Observer { |
bool observe_scheduled_deletions_; |
std::string origin_identifier_; |
base::string16 database_name_; |
- int64 database_size_; |
+ int64_t database_size_; |
}; |
void CheckNotificationReceived(TestObserver* observer, |
const std::string& expected_origin_identifier, |
const base::string16& expected_database_name, |
- int64 expected_database_size) { |
+ int64_t expected_database_size) { |
EXPECT_TRUE(observer->DidReceiveNewNotification()); |
EXPECT_EQ(expected_origin_identifier, |
observer->GetNotificationOriginIdentifier()); |
@@ -119,7 +122,7 @@ class TestQuotaManagerProxy : public storage::QuotaManagerProxy { |
void NotifyStorageModified(storage::QuotaClient::ID client_id, |
const GURL& origin, |
storage::StorageType type, |
- int64 delta) override { |
+ int64_t delta) override { |
EXPECT_EQ(storage::QuotaClient::kDatabase, client_id); |
EXPECT_EQ(storage::kStorageTypeTemporary, type); |
modifications_[origin].first += 1; |
@@ -149,7 +152,7 @@ class TestQuotaManagerProxy : public storage::QuotaManagerProxy { |
return accesses_[origin] != 0; |
} |
- bool WasModificationNotified(const GURL& origin, int64 amount) { |
+ bool WasModificationNotified(const GURL& origin, int64_t amount) { |
return modifications_[origin].first != 0 && |
modifications_[origin].second == amount; |
} |
@@ -165,14 +168,13 @@ class TestQuotaManagerProxy : public storage::QuotaManagerProxy { |
std::map<GURL, int> accesses_; |
// Map from origin to <count, sum of deltas> |
- std::map<GURL, std::pair<int, int64> > modifications_; |
+ std::map<GURL, std::pair<int, int64_t>> modifications_; |
protected: |
~TestQuotaManagerProxy() override { EXPECT_FALSE(registered_client_); } |
}; |
- |
-bool EnsureFileOfSize(const base::FilePath& file_path, int64 length) { |
+bool EnsureFileOfSize(const base::FilePath& file_path, int64_t length) { |
base::File file(file_path, |
base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_WRITE); |
if (!file.IsValid()) |
@@ -206,7 +208,7 @@ class DatabaseTracker_TestHelper_Test { |
NULL)); |
// Create and open three databases. |
- int64 database_size = 0; |
+ int64_t database_size = 0; |
const std::string kOrigin1 = |
storage::GetIdentifierFromOrigin(GURL(kOrigin1Url)); |
const std::string kOrigin2 = |
@@ -320,7 +322,7 @@ class DatabaseTracker_TestHelper_Test { |
tracker->AddObserver(&observer2); |
// Open three new databases. |
- int64 database_size = 0; |
+ int64_t database_size = 0; |
const std::string kOrigin1 = |
storage::GetIdentifierFromOrigin(GURL(kOrigin1Url)); |
const std::string kOrigin2 = |
@@ -470,7 +472,7 @@ class DatabaseTracker_TestHelper_Test { |
// Create a database and modify it a couple of times, close it, |
// then delete it. Observe the tracker notifies accordingly. |
- int64 database_size = 0; |
+ int64_t database_size = 0; |
tracker->DatabaseOpened(kOriginId, kName, kDescription, 0, |
&database_size); |
EXPECT_TRUE(test_quota_proxy->WasAccessNotified(kOrigin)); |
@@ -545,7 +547,7 @@ class DatabaseTracker_TestHelper_Test { |
} |
static void DatabaseTrackerClearSessionOnlyDatabasesOnExit() { |
- int64 database_size = 0; |
+ int64_t database_size = 0; |
const std::string kOrigin1 = |
storage::GetIdentifierFromOrigin(GURL(kOrigin1Url)); |
const std::string kOrigin2 = |
@@ -622,7 +624,7 @@ class DatabaseTracker_TestHelper_Test { |
} |
static void DatabaseTrackerSetForceKeepSessionState() { |
- int64 database_size = 0; |
+ int64_t database_size = 0; |
const std::string kOrigin1 = |
storage::GetIdentifierFromOrigin(GURL(kOrigin1Url)); |
const std::string kOrigin2 = |
@@ -718,7 +720,7 @@ class DatabaseTracker_TestHelper_Test { |
EXPECT_TRUE(infos.empty()); |
// Create a db with an empty name. |
- int64 database_size = -1; |
+ int64_t database_size = -1; |
tracker->DatabaseOpened(kOriginId, kEmptyName, kDescription, 0, |
&database_size); |
EXPECT_EQ(0, database_size); |
@@ -770,7 +772,7 @@ class DatabaseTracker_TestHelper_Test { |
// -------------------------------------------------------- |
// Create a record of a database in the tracker db and create |
// a spoof_db_file on disk in the expected location. |
- int64 database_size = 0; |
+ int64_t database_size = 0; |
tracker->DatabaseOpened(kOriginId, kName, kDescription, 0, |
&database_size); |
base::FilePath spoof_db_file = tracker->GetFullDBFilePath(kOriginId, kName); |