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

Unified Diff: components/sessions/core/session_backend.cc

Issue 1551433002: Switch to standard integer types in components/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more 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 | « components/sessions/core/session_backend.h ('k') | components/sessions/core/session_backend_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sessions/core/session_backend.cc
diff --git a/components/sessions/core/session_backend.cc b/components/sessions/core/session_backend.cc
index 90b326df7565fc5cc7d8f8aa24784009e5bb318d..d120962a231af31f93cb63429c470c28d928ed66 100644
--- a/components/sessions/core/session_backend.cc
+++ b/components/sessions/core/session_backend.cc
@@ -4,31 +4,35 @@
#include "components/sessions/core/session_backend.h"
+#include <stdint.h>
+
#include <limits>
#include "base/files/file.h"
#include "base/files/file_util.h"
+#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "base/metrics/histogram.h"
#include "base/threading/thread_restrictions.h"
+#include "build/build_config.h"
using base::TimeTicks;
namespace sessions {
// File version number.
-static const int32 kFileCurrentVersion = 1;
+static const int32_t kFileCurrentVersion = 1;
// The signature at the beginning of the file = SSNS (Sessions).
-static const int32 kFileSignature = 0x53534E53;
+static const int32_t kFileSignature = 0x53534E53;
namespace {
// The file header is the first bytes written to the file,
// and is used to identify the file as one written by us.
struct FileHeader {
- int32 signature;
- int32 version;
+ int32_t signature;
+ int32_t version;
};
// SessionFileReader ----------------------------------------------------------
@@ -274,7 +278,7 @@ void SessionBackend::MoveCurrentSessionToLastSession() {
if (base::PathExists(last_session_path))
base::DeleteFile(last_session_path, false);
if (base::PathExists(current_session_path)) {
- int64 file_size;
+ int64_t file_size;
if (base::GetFileSize(current_session_path, &file_size)) {
if (type_ == sessions::BaseSessionService::TAB_RESTORE) {
UMA_HISTOGRAM_COUNTS("TabRestore.last_session_file_size",
« no previous file with comments | « components/sessions/core/session_backend.h ('k') | components/sessions/core/session_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698