summaryrefslogtreecommitdiffstats
path: root/components/web_resource
diff options
context:
space:
mode:
authoravi <avi@chromium.org>2015-12-25 14:30:46 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-25 22:31:31 +0000
commit5dd91f87503390b4fbddc53cb13dc9e8e5d3e3ec (patch)
tree027c60f01fdcb12671bc2ee3e7d6b4ad8025e5d7 /components/web_resource
parenta2238c73732f3e3f3b20a4f231d92c130cff52ba (diff)
downloadchromium_src-5dd91f87503390b4fbddc53cb13dc9e8e5d3e3ec.zip
chromium_src-5dd91f87503390b4fbddc53cb13dc9e8e5d3e3ec.tar.gz
chromium_src-5dd91f87503390b4fbddc53cb13dc9e8e5d3e3ec.tar.bz2
Switch to standard integer types in components/, part 4 of 4.
BUG=138542 TBR=blundell@chromium.org Review URL: https://codereview.chromium.org/1549993003 Cr-Commit-Position: refs/heads/master@{#366870}
Diffstat (limited to 'components/web_resource')
-rw-r--r--components/web_resource/eula_accepted_notifier.cc1
-rw-r--r--components/web_resource/eula_accepted_notifier.h2
-rw-r--r--components/web_resource/eula_accepted_notifier_unittest.cc1
-rw-r--r--components/web_resource/notification_promo.cc4
-rw-r--r--components/web_resource/notification_promo.h2
-rw-r--r--components/web_resource/notification_promo_mobile_ntp.h2
-rw-r--r--components/web_resource/promo_resource_service.cc10
-rw-r--r--components/web_resource/promo_resource_service.h5
-rw-r--r--components/web_resource/promo_resource_service_mobile_ntp_unittest.cc2
-rw-r--r--components/web_resource/promo_resource_service_unittest.cc2
-rw-r--r--components/web_resource/resource_request_allowed_notifier.h1
-rw-r--r--components/web_resource/resource_request_allowed_notifier_test_util.h1
-rw-r--r--components/web_resource/resource_request_allowed_notifier_unittest.cc1
-rw-r--r--components/web_resource/web_resource_service.cc8
-rw-r--r--components/web_resource/web_resource_service.h5
15 files changed, 35 insertions, 12 deletions
diff --git a/components/web_resource/eula_accepted_notifier.cc b/components/web_resource/eula_accepted_notifier.cc
index 8faa234..b4ff13f 100644
--- a/components/web_resource/eula_accepted_notifier.cc
+++ b/components/web_resource/eula_accepted_notifier.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/prefs/pref_service.h"
+#include "build/build_config.h"
#include "components/web_resource/web_resource_pref_names.h"
namespace web_resource {
diff --git a/components/web_resource/eula_accepted_notifier.h b/components/web_resource/eula_accepted_notifier.h
index 552b53c..6a05b06 100644
--- a/components/web_resource/eula_accepted_notifier.h
+++ b/components/web_resource/eula_accepted_notifier.h
@@ -5,7 +5,7 @@
#ifndef COMPONENTS_WEB_RESOURCE_EULA_ACCEPTED_NOTIFIER_H_
#define COMPONENTS_WEB_RESOURCE_EULA_ACCEPTED_NOTIFIER_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/prefs/pref_change_registrar.h"
class PrefService;
diff --git a/components/web_resource/eula_accepted_notifier_unittest.cc b/components/web_resource/eula_accepted_notifier_unittest.cc
index f0374d5..b88156f 100644
--- a/components/web_resource/eula_accepted_notifier_unittest.cc
+++ b/components/web_resource/eula_accepted_notifier_unittest.cc
@@ -4,6 +4,7 @@
#include "components/web_resource/eula_accepted_notifier.h"
+#include "base/macros.h"
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/testing_pref_service.h"
#include "components/web_resource/web_resource_pref_names.h"
diff --git a/components/web_resource/notification_promo.cc b/components/web_resource/notification_promo.cc
index 73e7d4b..f0e9e71 100644
--- a/components/web_resource/notification_promo.cc
+++ b/components/web_resource/notification_promo.cc
@@ -4,10 +4,13 @@
#include "components/web_resource/notification_promo.h"
+#include <stddef.h>
+
#include <cmath>
#include <vector>
#include "base/bind.h"
+#include "base/macros.h"
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
#include "base/rand_util.h"
@@ -17,6 +20,7 @@
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "base/values.h"
+#include "build/build_config.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/version_info/version_info.h"
#include "components/web_resource/promo_resource_service.h"
diff --git a/components/web_resource/notification_promo.h b/components/web_resource/notification_promo.h
index 213f404..f26bcae 100644
--- a/components/web_resource/notification_promo.h
+++ b/components/web_resource/notification_promo.h
@@ -7,7 +7,7 @@
#include <string>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "url/gurl.h"
diff --git a/components/web_resource/notification_promo_mobile_ntp.h b/components/web_resource/notification_promo_mobile_ntp.h
index 29bbf1e..510e2e3 100644
--- a/components/web_resource/notification_promo_mobile_ntp.h
+++ b/components/web_resource/notification_promo_mobile_ntp.h
@@ -7,7 +7,7 @@
#include <string>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "components/web_resource/notification_promo.h"
namespace base {
diff --git a/components/web_resource/promo_resource_service.cc b/components/web_resource/promo_resource_service.cc
index 6c23da2..6d3f6a7d 100644
--- a/components/web_resource/promo_resource_service.cc
+++ b/components/web_resource/promo_resource_service.cc
@@ -4,15 +4,19 @@
#include "components/web_resource/promo_resource_service.h"
+#include <stddef.h>
+
#include "base/bind.h"
#include "base/command_line.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_restrictions.h"
#include "base/values.h"
+#include "build/build_config.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/web_resource/notification_promo.h"
#include "components/web_resource/web_resource_pref_names.h"
@@ -118,10 +122,10 @@ void PromoResourceService::ScheduleNotification(
const double promo_end = notification_promo.EndTime();
if (promo_start > 0 && promo_end > 0) {
- const int64 ms_until_start = static_cast<int64>(
+ const int64_t ms_until_start = static_cast<int64_t>(
(base::Time::FromDoubleT(promo_start) - base::Time::Now())
.InMilliseconds());
- const int64 ms_until_end = static_cast<int64>(
+ const int64_t ms_until_end = static_cast<int64_t>(
(base::Time::FromDoubleT(promo_end) - base::Time::Now())
.InMilliseconds());
if (ms_until_start > 0) {
@@ -154,7 +158,7 @@ void PromoResourceService::ScheduleNotificationOnInit() {
}
}
-void PromoResourceService::PostNotification(int64 delay_ms) {
+void PromoResourceService::PostNotification(int64_t delay_ms) {
// Note that this could cause re-issuing a notification every time
// we receive an update from a server if something goes wrong.
// Given that this couldn't happen more frequently than every
diff --git a/components/web_resource/promo_resource_service.h b/components/web_resource/promo_resource_service.h
index d36e07d..438f0da 100644
--- a/components/web_resource/promo_resource_service.h
+++ b/components/web_resource/promo_resource_service.h
@@ -5,10 +5,13 @@
#ifndef COMPONENTS_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_
#define COMPONENTS_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_
+#include <stdint.h>
+
#include <string>
#include "base/callback_forward.h"
#include "base/callback_list.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "components/web_resource/web_resource_service.h"
@@ -71,7 +74,7 @@ class PromoResourceService : public WebResourceService {
// If delay_ms is positive, schedule notification with the delay.
// If delay_ms is 0, notify immediately by calling WebResourceStateChange().
// If delay_ms is negative, do nothing.
- void PostNotification(int64 delay_ms);
+ void PostNotification(int64_t delay_ms);
// Notify listeners that the state of a web resource has changed.
void PromoResourceStateChange();
diff --git a/components/web_resource/promo_resource_service_mobile_ntp_unittest.cc b/components/web_resource/promo_resource_service_mobile_ntp_unittest.cc
index 760b7eb..e7387bc 100644
--- a/components/web_resource/promo_resource_service_mobile_ntp_unittest.cc
+++ b/components/web_resource/promo_resource_service_mobile_ntp_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+
#include <vector>
#include "base/json/json_reader.h"
diff --git a/components/web_resource/promo_resource_service_unittest.cc b/components/web_resource/promo_resource_service_unittest.cc
index 4fe7a73..1e07b1a 100644
--- a/components/web_resource/promo_resource_service_unittest.cc
+++ b/components/web_resource/promo_resource_service_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+
#include <utility>
#include <vector>
diff --git a/components/web_resource/resource_request_allowed_notifier.h b/components/web_resource/resource_request_allowed_notifier.h
index 890e700c5..aa80b1a 100644
--- a/components/web_resource/resource_request_allowed_notifier.h
+++ b/components/web_resource/resource_request_allowed_notifier.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_WEB_RESOURCE_RESOURCE_REQUEST_ALLOWED_NOTIFIER_H_
#define COMPONENTS_WEB_RESOURCE_RESOURCE_REQUEST_ALLOWED_NOTIFIER_H_
+#include "base/macros.h"
#include "components/web_resource/eula_accepted_notifier.h"
#include "net/base/network_change_notifier.h"
diff --git a/components/web_resource/resource_request_allowed_notifier_test_util.h b/components/web_resource/resource_request_allowed_notifier_test_util.h
index efae951..e1c3d1e 100644
--- a/components/web_resource/resource_request_allowed_notifier_test_util.h
+++ b/components/web_resource/resource_request_allowed_notifier_test_util.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_WEB_RESOURCE_RESOURCE_REQUEST_ALLOWED_NOTIFIER_TEST_UTIL_H_
#define COMPONENTS_WEB_RESOURCE_RESOURCE_REQUEST_ALLOWED_NOTIFIER_TEST_UTIL_H_
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "components/web_resource/resource_request_allowed_notifier.h"
diff --git a/components/web_resource/resource_request_allowed_notifier_unittest.cc b/components/web_resource/resource_request_allowed_notifier_unittest.cc
index 3383c8b..557faff 100644
--- a/components/web_resource/resource_request_allowed_notifier_unittest.cc
+++ b/components/web_resource/resource_request_allowed_notifier_unittest.cc
@@ -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/testing_pref_service.h"
#include "components/web_resource/eula_accepted_notifier.h"
#include "components/web_resource/resource_request_allowed_notifier_test_util.h"
diff --git a/components/web_resource/web_resource_service.cc b/components/web_resource/web_resource_service.cc
index 1afd22e..d7fa9fb 100644
--- a/components/web_resource/web_resource_service.cc
+++ b/components/web_resource/web_resource_service.cc
@@ -97,7 +97,7 @@ void WebResourceService::OnURLFetchComplete(const net::URLFetcher* source) {
// Delay initial load of resource data into cache so as not to interfere
// with startup time.
-void WebResourceService::ScheduleFetch(int64 delay_ms) {
+void WebResourceService::ScheduleFetch(int64_t delay_ms) {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::Bind(&WebResourceService::StartFetch,
weak_ptr_factory_.GetWeakPtr()),
@@ -163,7 +163,7 @@ void WebResourceService::OnUnpackError(const std::string& error_message) {
}
void WebResourceService::OnResourceRequestsAllowed() {
- int64 delay = start_fetch_delay_ms_;
+ int64_t delay = start_fetch_delay_ms_;
// Check whether we have ever put a value in the web resource cache;
// if so, pull it out and see if it's time to update again.
if (prefs_->HasPrefPath(last_update_time_pref_name_)) {
@@ -172,9 +172,9 @@ void WebResourceService::OnResourceRequestsAllowed() {
if (!last_update_pref.empty()) {
double last_update_value;
base::StringToDouble(last_update_pref, &last_update_value);
- int64 ms_until_update =
+ int64_t ms_until_update =
cache_update_delay_ms_ -
- static_cast<int64>(
+ static_cast<int64_t>(
(base::Time::Now() - base::Time::FromDoubleT(last_update_value))
.InMilliseconds());
// Wait at least |start_fetch_delay_ms_|.
diff --git a/components/web_resource/web_resource_service.h b/components/web_resource/web_resource_service.h
index 85cd899..b6ad154 100644
--- a/components/web_resource/web_resource_service.h
+++ b/components/web_resource/web_resource_service.h
@@ -5,9 +5,12 @@
#ifndef COMPONENTS_WEB_RESOURCE_WEB_RESOURCE_SERVICE_H_
#define COMPONENTS_WEB_RESOURCE_WEB_RESOURCE_SERVICE_H_
+#include <stdint.h>
+
#include <string>
#include "base/callback_forward.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
@@ -72,7 +75,7 @@ class WebResourceService
void OnURLFetchComplete(const net::URLFetcher* source) override;
// Schedules a fetch after |delay_ms| milliseconds.
- void ScheduleFetch(int64 delay_ms);
+ void ScheduleFetch(int64_t delay_ms);
// Starts fetching data from the server.
void StartFetch();