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

Unified Diff: base/prefs/pref_service.cc

Issue 1544033003: Switch to standard integer types in base/prefs/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « base/prefs/pref_service.h ('k') | base/prefs/pref_service_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/pref_service.cc
diff --git a/base/prefs/pref_service.cc b/base/prefs/pref_service.cc
index 7741306b2ee4b50c33075871d6a6b6e2fbc19f99..077bb1d25ff5aadd161eb9c834ad56cdf3a52676 100644
--- a/base/prefs/pref_service.cc
+++ b/base/prefs/pref_service.cc
@@ -41,8 +41,8 @@ class ReadErrorHandler : public PersistentPrefStore::ReadErrorDelegate {
// Returns the WriteablePrefStore::PrefWriteFlags for the pref with the given
// |path|.
-uint32 GetWriteFlags(const PrefService::Preference* pref) {
- uint32 write_flags = WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS;
+uint32_t GetWriteFlags(const PrefService::Preference* pref) {
+ uint32_t write_flags = WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS;
if (!pref)
return write_flags;
@@ -403,11 +403,11 @@ void PrefService::SetFilePath(const std::string& path,
SetUserPrefValue(path, base::CreateFilePathValue(value));
}
-void PrefService::SetInt64(const std::string& path, int64 value) {
+void PrefService::SetInt64(const std::string& path, int64_t value) {
SetUserPrefValue(path, new base::StringValue(base::Int64ToString(value)));
}
-int64 PrefService::GetInt64(const std::string& path) const {
+int64_t PrefService::GetInt64(const std::string& path) const {
DCHECK(CalledOnValidThread());
const base::Value* value = GetPreferenceValue(path);
@@ -419,16 +419,16 @@ int64 PrefService::GetInt64(const std::string& path) const {
bool rv = value->GetAsString(&result);
DCHECK(rv);
- int64 val;
+ int64_t val;
base::StringToInt64(result, &val);
return val;
}
-void PrefService::SetUint64(const std::string& path, uint64 value) {
+void PrefService::SetUint64(const std::string& path, uint64_t value) {
SetUserPrefValue(path, new base::StringValue(base::Uint64ToString(value)));
}
-uint64 PrefService::GetUint64(const std::string& path) const {
+uint64_t PrefService::GetUint64(const std::string& path) const {
DCHECK(CalledOnValidThread());
const base::Value* value = GetPreferenceValue(path);
@@ -440,7 +440,7 @@ uint64 PrefService::GetUint64(const std::string& path) const {
bool rv = value->GetAsString(&result);
DCHECK(rv);
- uint64 val;
+ uint64_t val;
base::StringToUint64(result, &val);
return val;
}
« no previous file with comments | « base/prefs/pref_service.h ('k') | base/prefs/pref_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698