0

Switch to standard integer types in xxx/.

BUG=138542
TBR=shess@chromium.org

Review URL: https://codereview.chromium.org/1533283002

Cr-Commit-Position: refs/heads/master@{#366346}
This commit is contained in:
avi
2015-12-20 23:25:19 -08:00
committed by Commit bot
parent 90e658dde8
commit 0b519209e6
19 changed files with 52 additions and 10 deletions

@ -4,6 +4,8 @@
#include "sql/connection.h"
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include "base/bind.h"
@ -120,22 +122,22 @@ bool ValidAttachmentPoint(const char* attachment_point) {
}
void RecordSqliteMemory10Min() {
const int64 used = sqlite3_memory_used();
const int64_t used = sqlite3_memory_used();
UMA_HISTOGRAM_COUNTS("Sqlite.MemoryKB.TenMinutes", used / 1024);
}
void RecordSqliteMemoryHour() {
const int64 used = sqlite3_memory_used();
const int64_t used = sqlite3_memory_used();
UMA_HISTOGRAM_COUNTS("Sqlite.MemoryKB.OneHour", used / 1024);
}
void RecordSqliteMemoryDay() {
const int64 used = sqlite3_memory_used();
const int64_t used = sqlite3_memory_used();
UMA_HISTOGRAM_COUNTS("Sqlite.MemoryKB.OneDay", used / 1024);
}
void RecordSqliteMemoryWeek() {
const int64 used = sqlite3_memory_used();
const int64_t used = sqlite3_memory_used();
UMA_HISTOGRAM_COUNTS("Sqlite.MemoryKB.OneWeek", used / 1024);
}
@ -843,7 +845,7 @@ std::string Connection::CollectCorruptionInfo() {
// If the file cannot be accessed it is unlikely that an integrity check will
// turn up actionable information.
const base::FilePath db_path = DbPath();
int64 db_size = -1;
int64_t db_size = -1;
if (!base::GetFileSize(db_path, &db_size) || db_size < 0)
return std::string();
@ -855,7 +857,7 @@ std::string Connection::CollectCorruptionInfo() {
db_size);
// Only check files up to 8M to keep things from blocking too long.
const int64 kMaxIntegrityCheckSize = 8192 * 1024;
const int64_t kMaxIntegrityCheckSize = 8192 * 1024;
if (db_size > kMaxIntegrityCheckSize) {
debug_info += "integrity_check skipped due to size\n";
} else {

@ -5,6 +5,7 @@
#ifndef SQL_CONNECTION_H_
#define SQL_CONNECTION_H_
#include <stddef.h>
#include <stdint.h>
#include <map>
#include <set>

@ -2,11 +2,15 @@
// 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/bind.h"
#include "base/files/file_util.h"
#include "base/files/scoped_file.h"
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/metrics/statistics_recorder.h"
#include "base/test/histogram_tester.h"
#include "base/trace_event/process_memory_dump.h"
@ -211,14 +215,14 @@ class ScopedUmaskSetter {
void sqlite_adjust_millis(sql::test::ScopedMockTimeSource* time_mock,
sqlite3_context* context,
int argc, sqlite3_value** argv) {
int64 milliseconds = argc > 0 ? sqlite3_value_int64(argv[0]) : 1000;
int64_t milliseconds = argc > 0 ? sqlite3_value_int64(argv[0]) : 1000;
time_mock->adjust(base::TimeDelta::FromMilliseconds(milliseconds));
sqlite3_result_int64(context, milliseconds);
}
// Adjust mock time by |milliseconds| on commit.
int adjust_commit_hook(sql::test::ScopedMockTimeSource* time_mock,
int64 milliseconds) {
int64_t milliseconds) {
time_mock->adjust(base::TimeDelta::FromMilliseconds(milliseconds));
return SQLITE_OK;
}

@ -4,6 +4,8 @@
#include "sql/meta_table.h"
#include <stdint.h>
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_util.h"

@ -4,6 +4,8 @@
#include "sql/meta_table.h"
#include <stdint.h>
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "sql/connection.h"

@ -4,6 +4,9 @@
#include "sql/mojo/mojo_vfs.h"
#include <stddef.h>
#include <stdint.h>
#include "base/logging.h"
#include "base/rand_util.h"
#include "base/strings/stringprintf.h"

@ -4,6 +4,9 @@
#include "sql/mojo/sql_test_base.h"
#include <stddef.h>
#include <stdint.h>
#include "mojo/application/public/cpp/application_impl.h"
#include "mojo/util/capture_util.h"
#include "sql/mojo/mojo_vfs.h"

@ -6,6 +6,7 @@
#define SQL_MOJO_SQL_TEST_BASE_H_
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "components/filesystem/public/interfaces/file_system.mojom.h"
#include "mojo/application/public/cpp/application_test_base.h"

@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stdint.h>
#include <memory>
#include "base/macros.h"
#include "components/filesystem/public/interfaces/file_system.mojom.h"
#include "mojo/application/public/cpp/application_impl.h"
#include "mojo/application/public/cpp/application_test_base.h"

@ -4,6 +4,8 @@
#include "sql/recovery.h"
#include <stddef.h>
#include "base/files/file_path.h"
#include "base/format_macros.h"
#include "base/logging.h"

@ -5,6 +5,8 @@
#ifndef SQL_RECOVERY_H_
#define SQL_RECOVERY_H_
#include <stddef.h>
#include "base/macros.h"
#include "sql/connection.h"

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stddef.h>
#include <string>
#include "base/bind.h"

@ -5,6 +5,7 @@
#ifndef SQL_PROCESS_MEMORY_DUMP_PROVIDER_H
#define SQL_PROCESS_MEMORY_DUMP_PROVIDER_H
#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/trace_event/memory_dump_provider.h"
#include "sql/sql_export.h"

@ -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 <string>
#include "base/bind.h"
@ -191,8 +194,8 @@ TEST_F(SQLiteFeaturesTest, Mmap) {
}
db().Close();
const uint32 kFlags =
base::File::FLAG_OPEN|base::File::FLAG_READ|base::File::FLAG_WRITE;
const uint32_t kFlags =
base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE;
char buf[4096];
// Create a file with a block of '0', a block of '1', and a block of '2'.

@ -4,6 +4,9 @@
#include "sql/statement.h"
#include <stddef.h>
#include <stdint.h>
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"

@ -5,6 +5,7 @@
#ifndef SQL_TEST_ERROR_CALLBACK_SUPPORT_H_
#define SQL_TEST_ERROR_CALLBACK_SUPPORT_H_
#include "base/macros.h"
#include "sql/connection.h"
namespace sql {

@ -7,6 +7,7 @@
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "sql/connection.h"
#include "testing/gtest/include/gtest/gtest.h"

@ -4,6 +4,9 @@
#include "sql/test/test_helpers.h"
#include <stddef.h>
#include <stdint.h>
#include <string>
#include "base/files/file_util.h"

@ -5,6 +5,9 @@
#ifndef SQL_TEST_TEST_HELPERS_H_
#define SQL_TEST_TEST_HELPERS_H_
#include <stddef.h>
#include <stdint.h>
#include <string>
#include "base/compiler_specific.h"