Commit 77d47636 authored by David Bertoni's avatar David Bertoni Committed by Commit Bot

[Extensions] Pass parameter as const.

Change-Id: I1ad110c817b75e62116dfcb0fabe17eb9f40088f
Reviewed-on: https://chromium-review.googlesource.com/c/1351598Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
Commit-Queue: David Bertoni <dbertoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611006}
parent 761e2f97
...@@ -98,7 +98,7 @@ bool LazyBackgroundTaskQueue::ShouldEnqueueTask( ...@@ -98,7 +98,7 @@ bool LazyBackgroundTaskQueue::ShouldEnqueueTask(
} }
void LazyBackgroundTaskQueue::AddPendingTaskToDispatchEvent( void LazyBackgroundTaskQueue::AddPendingTaskToDispatchEvent(
LazyContextId* context_id, const LazyContextId* context_id,
LazyContextTaskQueue::PendingTask task) { LazyContextTaskQueue::PendingTask task) {
AddPendingTask(context_id->browser_context(), context_id->extension_id(), AddPendingTask(context_id->browser_context(), context_id->extension_id(),
base::BindOnce(&PendingTaskAdapter, std::move(task))); base::BindOnce(&PendingTaskAdapter, std::move(task)));
......
...@@ -61,7 +61,7 @@ class LazyBackgroundTaskQueue : public KeyedService, ...@@ -61,7 +61,7 @@ class LazyBackgroundTaskQueue : public KeyedService,
// Currently AddPendingTask has lots of consumers that depend on // Currently AddPendingTask has lots of consumers that depend on
// ExtensionHost. // ExtensionHost.
void AddPendingTaskToDispatchEvent( void AddPendingTaskToDispatchEvent(
LazyContextId* context_id, const LazyContextId* context_id,
LazyContextTaskQueue::PendingTask task) override; LazyContextTaskQueue::PendingTask task) override;
// Adds a task to the queue for a given extension. If this is the first // Adds a task to the queue for a given extension. If this is the first
......
...@@ -66,7 +66,7 @@ class LazyContextTaskQueue { ...@@ -66,7 +66,7 @@ class LazyContextTaskQueue {
// is heavily used thoughout the codebase. // is heavily used thoughout the codebase.
// 2. LazyBackgroundTaskQueue::AddPendingTask is tied to ExtensionHost. This // 2. LazyBackgroundTaskQueue::AddPendingTask is tied to ExtensionHost. This
// class should be ExtensionHost agnostic. // class should be ExtensionHost agnostic.
virtual void AddPendingTaskToDispatchEvent(LazyContextId* context_id, virtual void AddPendingTaskToDispatchEvent(const LazyContextId* context_id,
PendingTask task) = 0; PendingTask task) = 0;
}; };
......
...@@ -201,7 +201,7 @@ bool ServiceWorkerTaskQueue::ShouldEnqueueTask(BrowserContext* context, ...@@ -201,7 +201,7 @@ bool ServiceWorkerTaskQueue::ShouldEnqueueTask(BrowserContext* context,
} }
void ServiceWorkerTaskQueue::AddPendingTaskToDispatchEvent( void ServiceWorkerTaskQueue::AddPendingTaskToDispatchEvent(
LazyContextId* context_id, const LazyContextId* context_id,
LazyContextTaskQueue::PendingTask task) { LazyContextTaskQueue::PendingTask task) {
DCHECK(context_id->is_for_service_worker()); DCHECK(context_id->is_for_service_worker());
...@@ -267,7 +267,7 @@ void ServiceWorkerTaskQueue::DeactivateExtension(const Extension* extension) { ...@@ -267,7 +267,7 @@ void ServiceWorkerTaskQueue::DeactivateExtension(const Extension* extension) {
} }
void ServiceWorkerTaskQueue::RunTaskAfterStartWorker( void ServiceWorkerTaskQueue::RunTaskAfterStartWorker(
LazyContextId* context_id, const LazyContextId* context_id,
LazyContextTaskQueue::PendingTask task) { LazyContextTaskQueue::PendingTask task) {
DCHECK(context_id->is_for_service_worker()); DCHECK(context_id->is_for_service_worker());
......
...@@ -38,7 +38,7 @@ class ServiceWorkerTaskQueue : public KeyedService, ...@@ -38,7 +38,7 @@ class ServiceWorkerTaskQueue : public KeyedService,
bool ShouldEnqueueTask(content::BrowserContext* context, bool ShouldEnqueueTask(content::BrowserContext* context,
const Extension* extension) override; const Extension* extension) override;
void AddPendingTaskToDispatchEvent( void AddPendingTaskToDispatchEvent(
LazyContextId* context_id, const LazyContextId* context_id,
LazyContextTaskQueue::PendingTask task) override; LazyContextTaskQueue::PendingTask task) override;
// Performs Service Worker related tasks upon |extension| activation, // Performs Service Worker related tasks upon |extension| activation,
...@@ -89,7 +89,7 @@ class ServiceWorkerTaskQueue : public KeyedService, ...@@ -89,7 +89,7 @@ class ServiceWorkerTaskQueue : public KeyedService,
content::ServiceWorkerContext* service_worker_context, content::ServiceWorkerContext* service_worker_context,
LazyContextTaskQueue::PendingTask task); LazyContextTaskQueue::PendingTask task);
void RunTaskAfterStartWorker(LazyContextId* context_id, void RunTaskAfterStartWorker(const LazyContextId* context_id,
LazyContextTaskQueue::PendingTask task); LazyContextTaskQueue::PendingTask task);
void DidRegisterServiceWorker(const ExtensionId& extension_id, bool success); void DidRegisterServiceWorker(const ExtensionId& extension_id, bool success);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment