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

Unified Diff: content/browser/background_sync/background_sync_manager.h

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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: content/browser/background_sync/background_sync_manager.h
diff --git a/content/browser/background_sync/background_sync_manager.h b/content/browser/background_sync/background_sync_manager.h
index 95ecb5fab4dd39ce0453949da166fca10b9e9e6c..7b12f6c810891276018ff97bd00569e685a245e6 100644
--- a/content/browser/background_sync/background_sync_manager.h
+++ b/content/browser/background_sync/background_sync_manager.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_MANAGER_H_
#define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_MANAGER_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <map>
#include <string>
#include <utility>
@@ -12,6 +15,7 @@
#include "base/callback_forward.h"
#include "base/cancelable_callback.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
@@ -67,7 +71,7 @@ class CONTENT_EXPORT BackgroundSyncManager
// The accepted registration will have a unique id. It may also have altered
// parameters if the user or UA chose different parameters than those
// supplied.
- void Register(int64 sw_registration_id,
+ void Register(int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& options,
bool requested_from_service_worker,
const StatusAndRegistrationCallback& callback);
@@ -79,7 +83,7 @@ class CONTENT_EXPORT BackgroundSyncManager
// BACKGROUND_SYNC_STATUS_OK on success. If the callback's status
// is not BACKGROUND_SYNC_STATUS_OK then the callback's RegistrationHandle
// will be nullptr.
- void GetRegistration(int64 sw_registration_id,
+ void GetRegistration(int64_t sw_registration_id,
const std::string& sync_registration_tag,
SyncPeriodicity periodicity,
const StatusAndRegistrationCallback& callback);
@@ -87,7 +91,7 @@ class CONTENT_EXPORT BackgroundSyncManager
// Finds the background sync registrations associated with
// |sw_registration_id| and periodicity |periodicity|. Calls
// |callback| with BACKGROUND_SYNC_STATUS_OK on success.
- void GetRegistrations(int64 sw_registration_id,
+ void GetRegistrations(int64_t sw_registration_id,
SyncPeriodicity periodicity,
const StatusAndRegistrationsCallback& callback);
@@ -97,7 +101,7 @@ class CONTENT_EXPORT BackgroundSyncManager
BackgroundSyncRegistrationHandle::HandleId handle_id);
// ServiceWorkerContextObserver overrides.
- void OnRegistrationDeleted(int64 sw_registration_id,
+ void OnRegistrationDeleted(int64_t sw_registration_id,
const GURL& pattern) override;
void OnStorageWiped() override;
@@ -131,7 +135,7 @@ class CONTENT_EXPORT BackgroundSyncManager
// The following methods are virtual for testing.
virtual void StoreDataInBackend(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const GURL& origin,
const std::string& backend_key,
const std::string& data,
@@ -184,7 +188,7 @@ class CONTENT_EXPORT BackgroundSyncManager
};
using PermissionStatusCallback = base::Callback<void(bool)>;
- using SWIdToRegistrationsMap = std::map<int64, BackgroundSyncRegistrations>;
+ using SWIdToRegistrationsMap = std::map<int64_t, BackgroundSyncRegistrations>;
static const size_t kMaxTagLength = 10240;
@@ -211,27 +215,27 @@ class CONTENT_EXPORT BackgroundSyncManager
void DisableAndClearManager(const base::Closure& callback);
void DisableAndClearDidGetRegistrations(
const base::Closure& callback,
- const std::vector<std::pair<int64, std::string>>& user_data,
+ const std::vector<std::pair<int64_t, std::string>>& user_data,
ServiceWorkerStatusCode status);
void DisableAndClearManagerClearedOne(const base::Closure& barrier_closure,
ServiceWorkerStatusCode status);
// Returns the existing registration or nullptr if it cannot be found.
RefCountedRegistration* LookupActiveRegistration(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const RegistrationKey& registration_key);
// Write all registrations for a given |sw_registration_id| to persistent
// storage.
- void StoreRegistrations(int64 sw_registration_id,
+ void StoreRegistrations(int64_t sw_registration_id,
const ServiceWorkerStorage::StatusCallback& callback);
// Removes the active registration if it is in the map.
- void RemoveActiveRegistration(int64 sw_registration_id,
+ void RemoveActiveRegistration(int64_t sw_registration_id,
const RegistrationKey& registration_key);
void AddActiveRegistration(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const GURL& origin,
const scoped_refptr<RefCountedRegistration>& sync_registration);
@@ -241,24 +245,24 @@ class CONTENT_EXPORT BackgroundSyncManager
scoped_ptr<BackgroundSyncParameters> parameters);
void InitDidGetDataFromBackend(
const base::Closure& callback,
- const std::vector<std::pair<int64, std::string>>& user_data,
+ const std::vector<std::pair<int64_t, std::string>>& user_data,
ServiceWorkerStatusCode status);
// Register callbacks
void RegisterCheckIfHasMainFrame(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& options,
const StatusAndRegistrationCallback& callback);
void RegisterDidCheckIfMainFrame(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& options,
const StatusAndRegistrationCallback& callback,
bool has_main_frame_client);
- void RegisterImpl(int64 sw_registration_id,
+ void RegisterImpl(int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& options,
const StatusAndRegistrationCallback& callback);
void RegisterDidStore(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const scoped_refptr<RefCountedRegistration>& new_registration_ref,
const StatusAndRegistrationCallback& callback,
ServiceWorkerStatusCode status);
@@ -267,16 +271,16 @@ class CONTENT_EXPORT BackgroundSyncManager
// |sync_registration_id|. Calls |callback| with
// BACKGROUND_SYNC_STATUS_NOT_FOUND if no match is found. Calls |callback|
// with BACKGROUND_SYNC_STATUS_OK on success.
- void Unregister(int64 sw_registration_id,
+ void Unregister(int64_t sw_registration_id,
BackgroundSyncRegistrationHandle::HandleId handle_id,
const StatusCallback& callback);
void UnregisterImpl(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const RegistrationKey& key,
BackgroundSyncRegistration::RegistrationId sync_registration_id,
SyncPeriodicity periodicity,
const StatusCallback& callback);
- void UnregisterDidStore(int64 sw_registration_id,
+ void UnregisterDidStore(int64_t sw_registration_id,
SyncPeriodicity periodicity,
const StatusCallback& callback,
ServiceWorkerStatusCode status);
@@ -293,12 +297,12 @@ class CONTENT_EXPORT BackgroundSyncManager
BackgroundSyncState status);
// GetRegistration callbacks
- void GetRegistrationImpl(int64 sw_registration_id,
+ void GetRegistrationImpl(int64_t sw_registration_id,
const RegistrationKey& registration_key,
const StatusAndRegistrationCallback& callback);
// GetRegistrations callbacks
- void GetRegistrationsImpl(int64 sw_registration_id,
+ void GetRegistrationsImpl(int64_t sw_registration_id,
SyncPeriodicity periodicity,
const StatusAndRegistrationsCallback& callback);
@@ -333,16 +337,16 @@ class CONTENT_EXPORT BackgroundSyncManager
void EventComplete(
const scoped_refptr<ServiceWorkerRegistration>&
service_worker_registration,
- int64 service_worker_id,
+ int64_t service_worker_id,
scoped_ptr<BackgroundSyncRegistrationHandle> registration_handle,
const base::Closure& callback,
ServiceWorkerStatusCode status_code);
void EventCompleteImpl(
- int64 service_worker_id,
+ int64_t service_worker_id,
scoped_ptr<BackgroundSyncRegistrationHandle> registration_handle,
ServiceWorkerStatusCode status_code,
const base::Closure& callback);
- void EventCompleteDidStore(int64 service_worker_id,
+ void EventCompleteDidStore(int64_t service_worker_id,
const base::Closure& callback,
ServiceWorkerStatusCode status_code);
@@ -351,7 +355,7 @@ class CONTENT_EXPORT BackgroundSyncManager
int number_of_batched_sync_events);
// OnRegistrationDeleted callbacks
- void OnRegistrationDeletedImpl(int64 sw_registration_id,
+ void OnRegistrationDeletedImpl(int64_t sw_registration_id,
const base::Closure& callback);
// OnStorageWiped callbacks

Powered by Google App Engine
This is Rietveld 408576698