Commit b896c715 authored by avi's avatar avi Committed by Commit bot

Switch to standard integer types in chrome/browser/, part 3 of 4.

BUG=138542
TBR=thakis@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#366883}
parent f5b61be8
......@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_OBSOLETE_SYSTEM_OBSOLETE_SYSTEM_H_
#define CHROME_BROWSER_OBSOLETE_SYSTEM_OBSOLETE_SYSTEM_H_
#include "base/basictypes.h"
#include "base/macros.h"
#include "base/strings/string16.h"
class ObsoleteSystem {
......
......@@ -4,6 +4,10 @@
#include "chrome/browser/obsolete_system/obsolete_system.h"
#include <stdint.h>
#include "build/build_config.h"
#if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS)
#include <gnu/libc-version.h>
......
......@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ABORTS_PAGE_LOAD_METRICS_OBSERVER_H_
#define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ABORTS_PAGE_LOAD_METRICS_OBSERVER_H_
#include "base/macros.h"
#include "components/page_load_metrics/browser/page_load_metrics_observer.h"
namespace internal {
......
......@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/macros.h"
#include "chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.h"
#include "chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.h"
......
......@@ -4,6 +4,7 @@
#include "chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "components/page_load_metrics/common/page_load_metrics_messages.h"
......
......@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_PAGE_LOAD_METRICS_OBSERVER_TEST_HARNESS_H_
#define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_PAGE_LOAD_METRICS_OBSERVER_TEST_HARNESS_H_
#include "base/macros.h"
#include "base/test/histogram_tester.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "components/page_load_metrics/browser/metrics_web_contents_observer.h"
......
......@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/macros.h"
#include "base/test/histogram_tester.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
......
......@@ -7,6 +7,7 @@
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
#include "base/android/scoped_java_ref.h"
#include "base/macros.h"
#include "chrome/browser/password_manager/chrome_password_manager_client.h"
#include "chrome/browser/password_manager/credential_android.h"
#include "chrome/browser/profiles/profile.h"
......
......@@ -5,9 +5,12 @@
#ifndef CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_DIALOG_ANDROID_H_
#define CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_DIALOG_ANDROID_H_
#include <stddef.h>
#include <vector>
#include "base/android/jni_android.h"
#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "chrome/browser/ui/passwords/manage_passwords_state.h"
......
......@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/macros.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.h"
#include "chrome/browser/profiles/profile.h"
......
......@@ -13,6 +13,7 @@
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/prefs/pref_service.h"
#include "build/build_config.h"
#include "chrome/browser/browsing_data/browsing_data_helper.h"
#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/profiles/profile.h"
......
......@@ -5,8 +5,8 @@
#ifndef CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_
#define CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/prefs/pref_member.h"
......
......@@ -4,9 +4,12 @@
#include "chrome/browser/password_manager/chrome_password_manager_client.h"
#include <stdint.h>
#include <string>
#include "base/command_line.h"
#include "base/macros.h"
#include "base/metrics/field_trial.h"
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
......@@ -122,7 +125,7 @@ ChromePasswordManagerClient* ChromePasswordManagerClientTest::GetClient() {
bool ChromePasswordManagerClientTest::WasLoggingActivationMessageSent(
bool* activation_flag) {
const uint32 kMsgID = AutofillMsg_SetLoggingState::ID;
const uint32_t kMsgID = AutofillMsg_SetLoggingState::ID;
const IPC::Message* message =
process()->sink().GetFirstMessageMatching(kMsgID);
if (!message)
......
......@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_PASSWORD_MANAGER_CREDENTIAL_ANDROID_H_
#define CHROME_BROWSER_PASSWORD_MANAGER_CREDENTIAL_ANDROID_H_
#include <stddef.h>
#include "base/android/jni_array.h"
#include "base/android/scoped_java_ref.h"
#include "components/autofill/core/common/password_form.h"
......
......@@ -4,7 +4,7 @@
#include "chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.h"
#include <cstddef>
#include <stddef.h>
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/android/chrome_application.h"
......
......@@ -6,12 +6,13 @@
#include <dlfcn.h>
#include <gnome-keyring.h>
#include <stddef.h>
#include <stdint.h>
#include <map>
#include <string>
#include <vector>
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram.h"
......@@ -134,7 +135,7 @@ scoped_ptr<PasswordForm> FormFromAttributes(GnomeKeyringAttributeList* attrs) {
form->signon_realm = string_attr_map["signon_realm"];
form->ssl_valid = uint_attr_map["ssl_valid"];
form->preferred = uint_attr_map["preferred"];
int64 date_created = 0;
int64_t date_created = 0;
bool date_ok = base::StringToInt64(string_attr_map["date_created"],
&date_created);
DCHECK(date_ok);
......@@ -151,7 +152,7 @@ scoped_ptr<PasswordForm> FormFromAttributes(GnomeKeyringAttributeList* attrs) {
form->type = static_cast<PasswordForm::Type>(uint_attr_map["type"]);
form->times_used = uint_attr_map["times_used"];
form->scheme = static_cast<PasswordForm::Scheme>(uint_attr_map["scheme"]);
int64 date_synced = 0;
int64_t date_synced = 0;
base::StringToInt64(string_attr_map["date_synced"], &date_synced);
form->date_synced = base::Time::FromInternalValue(date_synced);
form->display_name = UTF8ToUTF16(string_attr_map["display_name"]);
......@@ -335,12 +336,12 @@ class GKRMethod : public GnomeKeyringLoader {
void GKRMethod::AddLogin(const PasswordForm& form, const char* app_string) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
int64 date_created = form.date_created.ToInternalValue();
int64_t date_created = form.date_created.ToInternalValue();
// If we are asked to save a password with 0 date, use the current time.
// We don't want to actually save passwords as though on January 1, 1601.
if (!date_created)
date_created = base::Time::Now().ToInternalValue();
int64 date_synced = form.date_synced.ToInternalValue();
int64_t date_synced = form.date_synced.ToInternalValue();
std::string form_data;
SerializeFormDataToBase64String(form.form_data, &form_data);
gnome_keyring_store_password(
......
......@@ -19,8 +19,8 @@
#include <string>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "base/time/time.h"
#include "chrome/browser/password_manager/password_store_factory.h"
......
......@@ -3,8 +3,9 @@
// found in the LICENSE file.
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include "base/basictypes.h"
#include "base/location.h"
#include "base/prefs/pref_service.h"
#include "base/single_thread_task_runner.h"
......
......@@ -4,6 +4,9 @@
#include "chrome/browser/password_manager/native_backend_kwallet_x.h"
#include <stddef.h>
#include <stdint.h>
#include <vector>
#include "base/bind.h"
......@@ -148,7 +151,7 @@ bool DeserializeValueSize(const std::string& signon_realm,
form->signon_realm.assign(signon_realm);
int scheme = 0;
int64 date_created = 0;
int64_t date_created = 0;
int type = 0;
int generation_upload_status = 0;
// Note that these will be read back in the order listed due to
......@@ -181,7 +184,7 @@ bool DeserializeValueSize(const std::string& signon_realm,
}
if (version > 2) {
int64 date_synced = 0;
int64_t date_synced = 0;
if (!iter.ReadInt64(&date_synced)) {
LogDeserializationWarning(version, signon_realm, false);
return false;
......
......@@ -7,8 +7,8 @@
#include <string>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "base/nix/xdg_util.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 <algorithm>
#include <map>
#include <set>
......
......@@ -5,9 +5,10 @@
#include "chrome/browser/password_manager/native_backend_libsecret.h"
#include <dlfcn.h>
#include <stddef.h>
#include <stdint.h>
#include <list>
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram.h"
......@@ -160,7 +161,7 @@ scoped_ptr<PasswordForm> FormOutOfAttributes(GHashTable* attrs) {
form->signon_realm = GetStringFromAttributes(attrs, "signon_realm");
form->ssl_valid = GetUintFromAttributes(attrs, "ssl_valid");
form->preferred = GetUintFromAttributes(attrs, "preferred");
int64 date_created = 0;
int64_t date_created = 0;
bool date_ok = base::StringToInt64(
GetStringFromAttributes(attrs, "date_created"), &date_created);
DCHECK(date_ok);
......@@ -180,7 +181,7 @@ scoped_ptr<PasswordForm> FormOutOfAttributes(GHashTable* attrs) {
form->times_used = GetUintFromAttributes(attrs, "times_used");
form->scheme =
static_cast<PasswordForm::Scheme>(GetUintFromAttributes(attrs, "scheme"));
int64 date_synced = 0;
int64_t date_synced = 0;
base::StringToInt64(GetStringFromAttributes(attrs, "date_synced"),
&date_synced);
form->date_synced = base::Time::FromInternalValue(date_synced);
......@@ -210,7 +211,7 @@ class LibsecretAttributesBuilder {
LibsecretAttributesBuilder();
~LibsecretAttributesBuilder();
void Append(const std::string& name, const std::string& value);
void Append(const std::string& name, int64 value);
void Append(const std::string& name, int64_t value);
// GHashTable, its keys and values returned from Get() are destroyed in
// |LibsecretAttributesBuilder| desctructor.
GHashTable* Get() { return attrs_; }
......@@ -242,7 +243,8 @@ void LibsecretAttributesBuilder::Append(const std::string& name,
g_hash_table_insert(attrs_, name_str, value_str);
}
void LibsecretAttributesBuilder::Append(const std::string& name, int64 value) {
void LibsecretAttributesBuilder::Append(const std::string& name,
int64_t value) {
Append(name, base::Int64ToString(value));
}
......@@ -433,12 +435,12 @@ bool NativeBackendLibsecret::AddUpdateLoginSearch(
}
bool NativeBackendLibsecret::RawAddLogin(const PasswordForm& form) {
int64 date_created = form.date_created.ToInternalValue();
int64_t date_created = form.date_created.ToInternalValue();
// If we are asked to save a password with 0 date, use the current time.
// We don't want to actually save passwords as though on January 1, 1601.
if (!date_created)
date_created = base::Time::Now().ToInternalValue();
int64 date_synced = form.date_synced.ToInternalValue();
int64_t date_synced = form.date_synced.ToInternalValue();
std::string form_data;
SerializeFormDataToBase64String(form.form_data, &form_data);
GError* error = nullptr;
......
......@@ -9,8 +9,8 @@
#include <string>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "base/time/time.h"
#include "chrome/browser/password_manager/password_store_factory.h"
......
......@@ -3,8 +3,9 @@
// found in the LICENSE file.
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include "base/basictypes.h"
#include "base/location.h"
#include "base/prefs/pref_service.h"
#include "base/single_thread_task_runner.h"
......
......@@ -5,6 +5,7 @@
#include <string>
#include "base/command_line.h"
#include "base/macros.h"
#include "base/metrics/histogram_samples.h"
#include "base/metrics/statistics_recorder.h"
#include "base/path_service.h"
......@@ -12,6 +13,7 @@
#include "base/stl_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/chrome_notification_types.h"