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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs_unittest.cc

Issue 1546143002: Switch to standard integer types in components/, part 1 of 4. (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
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs_unittest.cc
index bca6bfb70493ff58c964a0247dbaa3ed896a6aae..6ff2b5dd0381f753f4b07f66bb29c12434320475 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs_unittest.cc
@@ -4,6 +4,8 @@
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.h"
+#include <stdint.h>
+
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/scoped_user_pref_update.h"
@@ -32,28 +34,28 @@ class DataReductionProxyPrefsTest : public testing::Test {
return &profile_prefs_;
}
- // Initializes a list with ten string representations of successive int64
+ // Initializes a list with ten string representations of successive int64_t
// values, starting with |starting_value|.
void InitializeList(const char* pref_name,
- int64 starting_value,
+ int64_t starting_value,
PrefService* pref_service) {
ListPrefUpdate list(local_state_prefs(), pref_name);
- for (int64 i = 0; i < 10L; ++i) {
+ for (int64_t i = 0; i < 10L; ++i) {
list->Set(i, new base::StringValue(
base::Int64ToString(i + starting_value)));
}
}
- // Verifies that ten string repreentations of successive int64 values starting
- // with |starting_value| are found in the |ListValue| with the associated
- // |pref_name|.
+ // Verifies that ten string repreentations of successive int64_t values
+ // starting with |starting_value| are found in the |ListValue| with the
+ // associated |pref_name|.
void VerifyList(const char* pref_name,
- int64 starting_value,
+ int64_t starting_value,
PrefService* pref_service) {
const base::ListValue* list_value = pref_service->GetList(pref_name);
- for (int64 i = 0; i < 10L; ++i) {
+ for (int64_t i = 0; i < 10L; ++i) {
std::string string_value;
- int64 value;
+ int64_t value;
list_value->GetString(i, &string_value);
base::StringToInt64(string_value, &value);
EXPECT_EQ(i + starting_value, value);

Powered by Google App Engine
This is Rietveld 408576698