Skip to content

Commit

Permalink
Switch to standard integer types in ios/.
Browse files Browse the repository at this point in the history
BUG=138542
TBR=stuartmorgan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#366521}
  • Loading branch information
avi authored and Commit bot committed Dec 22, 2015
1 parent 74a1875 commit 5719436
Show file tree
Hide file tree
Showing 199 changed files with 356 additions and 105 deletions.
2 changes: 2 additions & 0 deletions ios/chrome/app/deferred_initialization_runner.mm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#import "ios/chrome/app/deferred_initialization_runner.h"

#include <stdint.h>

#include "base/logging.h"
#include "base/mac/scoped_nsobject.h"

Expand Down
1 change: 1 addition & 0 deletions ios/chrome/app/safe_mode_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "ios/chrome/app/safe_mode_util.h"

#include <mach-o/dyld.h>
#include <stdint.h>

namespace safe_mode_util {

Expand Down
1 change: 1 addition & 0 deletions ios/chrome/app/safe_mode_util_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stddef.h>
#include <string.h>

#include "base/files/file_path.h"
Expand Down
2 changes: 2 additions & 0 deletions ios/chrome/browser/about_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#ifndef IOS_CHROME_BROWSER_ABOUT_FLAGS_H_
#define IOS_CHROME_BROWSER_ABOUT_FLAGS_H_

#include <stddef.h>

#include "components/flags_ui/flags_state.h"

namespace base {
Expand Down
9 changes: 6 additions & 3 deletions ios/chrome/browser/about_flags.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@

#include "ios/chrome/browser/about_flags.h"

#include <stddef.h>
#include <stdint.h>
#import <UIKit/UIKit.h>

#include "base/bind.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/strings/stringprintf.h"
#include "base/strings/sys_string_conversions.h"
Expand Down Expand Up @@ -223,9 +226,9 @@ void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
if ([defaults boolForKey:@"UseMobileSafariUA"]) {
// Safari uses "Vesion/", followed by the OS version excluding bugfix, where
// Chrome puts its product token.
int32 major = 0;
int32 minor = 0;
int32 bugfix = 0;
int32_t major = 0;
int32_t minor = 0;
int32_t bugfix = 0;
base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
std::string product = base::StringPrintf("Version/%d.%d", major, minor);

Expand Down
8 changes: 5 additions & 3 deletions ios/chrome/browser/autofill/form_suggestion_label.mm
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@

#import "ios/chrome/browser/autofill/form_suggestion_label.h"

#include <cmath>

#import <QuartzCore/QuartzCore.h>
#include <stddef.h>

#include <cmath>

#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/sys_string_conversions.h"
#include "components/autofill/core/browser/credit_card.h"
#import "components/autofill/ios/browser/form_suggestion.h"
#import "ios/chrome/browser/autofill/form_suggestion_view_client.h"
#import "ios/chrome/browser/ui/uikit_ui_util.h"
#include "ios/chrome/browser/ui/ui_util.h"
#import "ios/chrome/browser/ui/uikit_ui_util.h"
#include "ios/chrome/grit/ios_strings.h"
#include "ui/base/l10n/l10n_util.h"

Expand Down
2 changes: 2 additions & 0 deletions ios/chrome/browser/browser_state/browser_state_info_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ios/chrome/browser/browser_state/browser_state_info_cache.h"

#include <stddef.h>

#include <algorithm>

#include "base/i18n/case_conversion.h"
Expand Down
2 changes: 2 additions & 0 deletions ios/chrome/browser/browser_state/browser_state_info_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef IOS_CHROME_BROWSER_BROWSER_STATE_BROWSER_STATE_INFO_CACHE_H_
#define IOS_CHROME_BROWSER_BROWSER_STATE_BROWSER_STATE_INFO_CACHE_H_

#include <stddef.h>

#include <string>
#include <vector>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#ifndef IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IMPL_IO_DATA_H_
#define IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IMPL_IO_DATA_H_

#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/prefs/pref_store.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state_io_data.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@

#include "ios/chrome/browser/browser_state/chrome_browser_state_io_data.h"

#include <stddef.h>

#include <string>

#include "base/basictypes.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/debug/alias.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/path_service.h"
#include "base/prefs/pref_service.h"
#include "base/stl_util.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#include <string>
#include <vector>

#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#ifndef IOS_CHROME_BROWSER_BROWSER_STATE_OFF_THE_RECORD_CHROME_BROWSER_STATE_IO_DATA_H_
#define IOS_CHROME_BROWSER_BROWSER_STATE_OFF_THE_RECORD_CHROME_BROWSER_STATE_IO_DATA_H_

#include "base/basictypes.h"
#include "base/callback.h"
#include "base/containers/hash_tables.h"
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state_io_data.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ios/chrome/browser/browser_state_metrics/browser_state_metrics.h"

#include <stddef.h>

#include "components/profile_metrics/counts.h"
#include "ios/chrome/browser/browser_state/browser_state_info_cache.h"
#include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state_manager.h"
Expand Down
2 changes: 2 additions & 0 deletions ios/chrome/browser/chrome_url_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ios/chrome/browser/chrome_url_constants.h"

#include <stddef.h>

#include "base/macros.h"

const char kChromeUIScheme[] = "chrome";
Expand Down
1 change: 1 addition & 0 deletions ios/chrome/browser/chrome_url_util_unittest.mm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#import "ios/chrome/browser/chrome_url_util.h"

#include "base/macros.h"
#include "ios/chrome/browser/chrome_url_constants.h"
#import "net/base/mac/url_conversions.h"
#import "testing/gtest_mac.h"
Expand Down
1 change: 1 addition & 0 deletions ios/chrome/browser/crash_report/breakpad_helper.mm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "ios/chrome/browser/crash_report/breakpad_helper.h"

#import <Foundation/Foundation.h>
#include <stddef.h>

#include "base/auto_reset.h"
#include "base/bind.h"
Expand Down
2 changes: 2 additions & 0 deletions ios/chrome/browser/crash_report/crash_keys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ios/chrome/browser/crash_report/crash_keys.h"

#include <stddef.h>

#include "base/debug/crash_logging.h"
#include "base/macros.h"
#include "components/crash/core/common/crash_keys.h"
Expand Down
1 change: 1 addition & 0 deletions ios/chrome/browser/dom_distiller/distiller_viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <string>

#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "components/dom_distiller/core/dom_distiller_request_view_base.h"
#include "components/dom_distiller/core/task_tracker.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "ios/chrome/browser/dom_distiller/dom_distiller_service_factory.h"

#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/threading/sequenced_worker_pool.h"
#include "components/dom_distiller/core/article_entry.h"
Expand Down
1 change: 1 addition & 0 deletions ios/chrome/browser/favicon/large_icon_cache_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "ios/chrome/browser/favicon/large_icon_cache.h"

#include "base/macros.h"
#include "components/favicon_base/fallback_icon_style.h"
#include "components/favicon_base/favicon_types.h"
#include "skia/ext/skia_utils_ios.h"
Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/first_run/first_run.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef IOS_CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_
#define IOS_CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_

#include "base/basictypes.h"
#include "base/macros.h"

namespace base {
class FilePath;
Expand Down
9 changes: 5 additions & 4 deletions ios/chrome/browser/geolocation/CLLocation+XGeoHeader.mm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

#import "ios/chrome/browser/geolocation/CLLocation+XGeoHeader.h"

#include "base/basictypes.h"
#include <stdint.h>

#import "third_party/google_toolbox_for_mac/src/Foundation/GTMStringEncoding.h"

NSString* const kGMOLocationDescriptorFormat =
Expand Down Expand Up @@ -33,11 +34,11 @@ - (NSString*)cr_serializeStringToWebSafeBase64String:(NSString*)data {

// Returns the timestamp of this location in microseconds since the UNIX epoch.
// Returns 0 if the timestamp is unavailable or invalid.
- (int64)cr_timestampInMicroseconds {
- (int64_t)cr_timestampInMicroseconds {
NSTimeInterval seconds = [self.timestamp timeIntervalSince1970];
if (seconds > 0) {
const int64 kSecondsToMicroseconds = 1000000;
return (int64)(seconds * kSecondsToMicroseconds);
const int64_t kSecondsToMicroseconds = 1000000;
return (int64_t)(seconds * kSecondsToMicroseconds);
}
return 0;
}
Expand Down
1 change: 1 addition & 0 deletions ios/chrome/browser/infobars/infobar.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define IOS_CHROME_BROWSER_INFOBARS_INFOBAR_H_

#include "base/mac/scoped_nsobject.h"
#include "base/macros.h"
#include "components/infobars/core/infobar.h"
#import "ios/public/provider/chrome/browser/ui/infobar_view_delegate.h"

Expand Down
3 changes: 3 additions & 0 deletions ios/chrome/browser/infobars/infobar_container_ios.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

#include "components/infobars/core/infobar_container.h"

#include <stddef.h>

#include "base/mac/scoped_nsobject.h"
#include "base/macros.h"

@class InfoBarContainerView;
class InfoBarIOS;
Expand Down
1 change: 1 addition & 0 deletions ios/chrome/browser/infobars/infobar_container_ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "ios/chrome/browser/infobars/infobar_container_ios.h"

#include <stddef.h>
#import <UIKit/UIKit.h>

#include "base/logging.h"
Expand Down
1 change: 1 addition & 0 deletions ios/chrome/browser/infobars/infobar_manager_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef IOS_CHROME_BROWSER_INFOBARS_INFOBAR_MANAGER_IMPL_H_
#define IOS_CHROME_BROWSER_INFOBARS_INFOBAR_MANAGER_IMPL_H_

#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "components/infobars/core/infobar_manager.h"
#include "ios/web/public/web_state/web_state_observer.h"
Expand Down
4 changes: 3 additions & 1 deletion ios/chrome/browser/install_time_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
#ifndef IOS_CHROME_BROWSER_INSTALL_TIME_UTIL_H_
#define IOS_CHROME_BROWSER_INSTALL_TIME_UTIL_H_

#include <stdint.h>

#include "base/time/time.h"

namespace install_time_util {

extern const int64 kUnknownInstallDate;
extern const int64_t kUnknownInstallDate;

// Computes the true installation time of the application based on the current
// install time stored in NSUserDefaults and whether or not this is a first run
Expand Down
3 changes: 2 additions & 1 deletion ios/chrome/browser/install_time_util.mm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "ios/chrome/browser/install_time_util.h"

#include <Foundation/Foundation.h>
#include <stdint.h>

#include "base/mac/foundation_util.h"

Expand All @@ -31,7 +32,7 @@

// 2 is used because 0 is a magic value for Time, and 1 was the pre-M29 value
// which was migrated to a specific date (crbug.com/270124).
const int64 kUnknownInstallDate = 2;
const int64_t kUnknownInstallDate = 2;

base::Time ComputeInstallationTime(bool is_first_run) {
return ComputeInstallationTimeInternal(is_first_run,
Expand Down
1 change: 1 addition & 0 deletions ios/chrome/browser/installation_notifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define IOS_CHROME_BROWSER_INSTALLATION_NOTIFIER_H_

#import <Foundation/Foundation.h>
#include <stdint.h>

class GURL;

Expand Down
1 change: 1 addition & 0 deletions ios/chrome/browser/installation_notifier.mm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#import "ios/chrome/browser/installation_notifier.h"

#include <stdint.h>
#import <UIKit/UIKit.h>

#include "base/ios/weak_nsobject.h"
Expand Down
1 change: 1 addition & 0 deletions ios/chrome/browser/installation_notifier_unittest.mm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#import "ios/chrome/browser/installation_notifier.h"

#include <stdint.h>
#import <UIKit/UIKit.h>

#include "base/ios/block_types.h"
Expand Down
3 changes: 3 additions & 0 deletions ios/chrome/browser/ios_chrome_io_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ios/chrome/browser/ios_chrome_io_thread.h"

#include <stddef.h>

#include <vector>

#include "base/bind.h"
Expand All @@ -13,6 +15,7 @@
#include "base/debug/leak_tracker.h"
#include "base/environment.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/metrics/field_trial.h"
#include "base/prefs/pref_service.h"
#include "base/stl_util.h"
Expand Down
9 changes: 6 additions & 3 deletions ios/chrome/browser/ios_chrome_io_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
#ifndef IOS_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_
#define IOS_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_

#include <stddef.h>
#include <stdint.h>

#include <map>
#include <set>
#include <string>
#include <vector>

#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
Expand Down Expand Up @@ -128,8 +131,8 @@ class IOSChromeIOThread : public web::WebThreadDelegate {
scoped_refptr<net::CookieStore> system_cookie_store;
scoped_ptr<net::HttpUserAgentSettings> http_user_agent_settings;
scoped_ptr<net::NetworkQualityEstimator> network_quality_estimator;
uint16 testing_fixed_http_port;
uint16 testing_fixed_https_port;
uint16_t testing_fixed_http_port;
uint16_t testing_fixed_https_port;
Optional<bool> enable_tcp_fast_open_for_ssl;

Optional<size_t> initial_max_spdy_concurrent_streams;
Expand Down
Loading

0 comments on commit 5719436

Please sign in to comment.