diff options
author | avi <avi@chromium.org> | 2015-12-21 13:21:50 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-21 21:22:39 +0000 |
commit | 5caf646e7e6638f9207f61e659492530dd0686e3 (patch) | |
tree | 2ac1a647ccb7deb5973e712d9923450d5e9cc248 /storage/common | |
parent | aac8167a5b9e48b8dba95d7120f1f469d491fd05 (diff) | |
download | chromium_src-5caf646e7e6638f9207f61e659492530dd0686e3.zip chromium_src-5caf646e7e6638f9207f61e659492530dd0686e3.tar.gz chromium_src-5caf646e7e6638f9207f61e659492530dd0686e3.tar.bz2 |
Switch to standard integer types in storage/.
BUG=138542
TBR=danakj@chromium.org
Review URL: https://codereview.chromium.org/1541933002
Cr-Commit-Position: refs/heads/master@{#366458}
Diffstat (limited to 'storage/common')
-rw-r--r-- | storage/common/blob_storage/blob_item_bytes_request.cc | 3 | ||||
-rw-r--r-- | storage/common/blob_storage/blob_item_bytes_request.h | 2 | ||||
-rw-r--r-- | storage/common/blob_storage/blob_item_bytes_response.cc | 2 | ||||
-rw-r--r-- | storage/common/blob_storage/blob_item_bytes_response.h | 2 | ||||
-rw-r--r-- | storage/common/blob_storage/blob_storage_constants.h | 5 | ||||
-rw-r--r-- | storage/common/data_element.cc | 3 | ||||
-rw-r--r-- | storage/common/data_element.h | 1 | ||||
-rw-r--r-- | storage/common/database/database_connections.cc | 6 | ||||
-rw-r--r-- | storage/common/database/database_connections.h | 10 | ||||
-rw-r--r-- | storage/common/database/database_identifier.cc | 3 | ||||
-rw-r--r-- | storage/common/database/database_identifier.h | 1 | ||||
-rw-r--r-- | storage/common/fileapi/directory_entry.h | 1 | ||||
-rw-r--r-- | storage/common/fileapi/file_system_util.cc | 3 |
13 files changed, 31 insertions, 11 deletions
diff --git a/storage/common/blob_storage/blob_item_bytes_request.cc b/storage/common/blob_storage/blob_item_bytes_request.cc index fa5eb68..2f08772 100644 --- a/storage/common/blob_storage/blob_item_bytes_request.cc +++ b/storage/common/blob_storage/blob_item_bytes_request.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 "storage/common/blob_storage/blob_item_bytes_request.h" namespace storage { diff --git a/storage/common/blob_storage/blob_item_bytes_request.h b/storage/common/blob_storage/blob_item_bytes_request.h index 00d6d18..11a619c 100644 --- a/storage/common/blob_storage/blob_item_bytes_request.h +++ b/storage/common/blob_storage/blob_item_bytes_request.h @@ -5,10 +5,10 @@ #ifndef STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_REQUEST_H_ #define STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_REQUEST_H_ +#include <stddef.h> #include <stdint.h> #include <ostream> -#include "base/basictypes.h" #include "storage/common/blob_storage/blob_storage_constants.h" #include "storage/common/storage_common_export.h" diff --git a/storage/common/blob_storage/blob_item_bytes_response.cc b/storage/common/blob_storage/blob_item_bytes_response.cc index 8e81dc6..40c0781 100644 --- a/storage/common/blob_storage/blob_item_bytes_response.cc +++ b/storage/common/blob_storage/blob_item_bytes_response.cc @@ -4,6 +4,8 @@ #include "storage/common/blob_storage/blob_item_bytes_response.h" +#include <stddef.h> + #include <algorithm> #include <string> diff --git a/storage/common/blob_storage/blob_item_bytes_response.h b/storage/common/blob_storage/blob_item_bytes_response.h index 344cc7d..189313f 100644 --- a/storage/common/blob_storage/blob_item_bytes_response.h +++ b/storage/common/blob_storage/blob_item_bytes_response.h @@ -5,12 +5,12 @@ #ifndef STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_RESPONSE_H_ #define STORAGE_COMMON_BLOB_STORAGE_BLOB_ITEM_BYTES_RESPONSE_H_ +#include <stddef.h> #include <stdint.h> #include <algorithm> #include <ostream> #include <vector> -#include "base/basictypes.h" #include "storage/common/storage_common_export.h" namespace storage { diff --git a/storage/common/blob_storage/blob_storage_constants.h b/storage/common/blob_storage/blob_storage_constants.h index ddf97ec..e77c868 100644 --- a/storage/common/blob_storage/blob_storage_constants.h +++ b/storage/common/blob_storage/blob_storage_constants.h @@ -5,11 +5,14 @@ #ifndef STORAGE_COMMON_BLOB_STORAGE_BLOB_STORAGE_CONSTANTS_H_ #define STORAGE_COMMON_BLOB_STORAGE_BLOB_STORAGE_CONSTANTS_H_ +#include <stddef.h> +#include <stdint.h> + namespace storage { // TODO(michaeln): use base::SysInfo::AmountOfPhysicalMemoryMB() in some // way to come up with a better limit. -const int64 kBlobStorageMaxMemoryUsage = 500 * 1024 * 1024; // Half a gig. +const int64_t kBlobStorageMaxMemoryUsage = 500 * 1024 * 1024; // Half a gig. const size_t kBlobStorageIPCThresholdBytes = 250 * 1024; const size_t kBlobStorageMaxSharedMemoryBytes = 10 * 1024 * 1024; const uint64_t kBlobStorageMaxFileSizeBytes = 100 * 1024 * 1024; diff --git a/storage/common/data_element.cc b/storage/common/data_element.cc index 8b1fc4d..821badb 100644 --- a/storage/common/data_element.cc +++ b/storage/common/data_element.cc @@ -4,6 +4,9 @@ #include "storage/common/data_element.h" +#include <stddef.h> +#include <stdint.h> + #include <algorithm> #include "base/strings/string_number_conversions.h" diff --git a/storage/common/data_element.h b/storage/common/data_element.h index 2e9ce9c..2f28c40 100644 --- a/storage/common/data_element.h +++ b/storage/common/data_element.h @@ -5,6 +5,7 @@ #ifndef STORAGE_COMMON_DATA_ELEMENT_H_ #define STORAGE_COMMON_DATA_ELEMENT_H_ +#include <stddef.h> #include <stdint.h> #include <limits> diff --git a/storage/common/database/database_connections.cc b/storage/common/database/database_connections.cc index 35bc139..aa82d1e 100644 --- a/storage/common/database/database_connections.cc +++ b/storage/common/database/database_connections.cc @@ -4,6 +4,8 @@ #include "storage/common/database/database_connections.h" +#include <stdint.h> + #include "base/auto_reset.h" #include "base/bind.h" #include "base/logging.h" @@ -74,7 +76,7 @@ void DatabaseConnections::RemoveConnections( } } -int64 DatabaseConnections::GetOpenDatabaseSize( +int64_t DatabaseConnections::GetOpenDatabaseSize( const std::string& origin_identifier, const base::string16& database_name) const { DCHECK(IsDatabaseOpened(origin_identifier, database_name)); @@ -84,7 +86,7 @@ int64 DatabaseConnections::GetOpenDatabaseSize( void DatabaseConnections::SetOpenDatabaseSize( const std::string& origin_identifier, const base::string16& database_name, - int64 size) { + int64_t size) { DCHECK(IsDatabaseOpened(origin_identifier, database_name)); connections_[origin_identifier][database_name].second = size; } diff --git a/storage/common/database/database_connections.h b/storage/common/database/database_connections.h index ec36b0f..fe66ac2 100644 --- a/storage/common/database/database_connections.h +++ b/storage/common/database/database_connections.h @@ -5,6 +5,8 @@ #ifndef STORAGE_COMMON_DATABASE_DATABASE_CONNECTIONS_H_ #define STORAGE_COMMON_DATABASE_DATABASE_CONNECTIONS_H_ +#include <stdint.h> + #include <map> #include <string> #include <vector> @@ -46,11 +48,11 @@ class STORAGE_COMMON_EXPORT DatabaseConnections { std::vector<std::pair<std::string, base::string16> >* closed_dbs); // Database sizes can be kept only if IsDatabaseOpened returns true. - int64 GetOpenDatabaseSize(const std::string& origin_identifier, - const base::string16& database_name) const; + int64_t GetOpenDatabaseSize(const std::string& origin_identifier, + const base::string16& database_name) const; void SetOpenDatabaseSize(const std::string& origin_identifier, const base::string16& database_name, - int64 size); + int64_t size); // Returns a list of the connections, <origin_id, name>. void ListConnections( @@ -58,7 +60,7 @@ class STORAGE_COMMON_EXPORT DatabaseConnections { private: // Mapping from name to <openCount, size> - typedef std::map<base::string16, std::pair<int, int64> > DBConnections; + typedef std::map<base::string16, std::pair<int, int64_t>> DBConnections; typedef std::map<std::string, DBConnections> OriginConnections; mutable OriginConnections connections_; // mutable for GetOpenDatabaseSize diff --git a/storage/common/database/database_identifier.cc b/storage/common/database/database_identifier.cc index 094e01f..2c1aa55 100644 --- a/storage/common/database/database_identifier.cc +++ b/storage/common/database/database_identifier.cc @@ -4,6 +4,9 @@ #include "storage/common/database/database_identifier.h" +#include <stddef.h> + +#include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "url/url_canon.h" diff --git a/storage/common/database/database_identifier.h b/storage/common/database/database_identifier.h index a658ade..a37e2ad 100644 --- a/storage/common/database/database_identifier.h +++ b/storage/common/database/database_identifier.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" #include "base/strings/string_piece.h" #include "storage/common/storage_common_export.h" #include "url/gurl.h" diff --git a/storage/common/fileapi/directory_entry.h b/storage/common/fileapi/directory_entry.h index fab7fae..0f86030 100644 --- a/storage/common/fileapi/directory_entry.h +++ b/storage/common/fileapi/directory_entry.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" #include "base/files/file_path.h" #include "base/time/time.h" #include "storage/common/storage_common_export.h" diff --git a/storage/common/fileapi/file_system_util.cc b/storage/common/fileapi/file_system_util.cc index 16d74e4..4ce1657 100644 --- a/storage/common/fileapi/file_system_util.cc +++ b/storage/common/fileapi/file_system_util.cc @@ -4,9 +4,12 @@ #include "storage/common/fileapi/file_system_util.h" +#include <stddef.h> + #include <algorithm> #include "base/logging.h" +#include "base/macros.h" #include "base/strings/string_util.h" #include "base/strings/sys_string_conversions.h" #include "base/strings/utf_string_conversions.h" |