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

Unified Diff: extensions/browser/lazy_background_task_queue.cc

Issue 598173003: Run clang-modernize -use-nullptr over src/extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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: extensions/browser/lazy_background_task_queue.cc
diff --git a/extensions/browser/lazy_background_task_queue.cc b/extensions/browser/lazy_background_task_queue.cc
index 5ac92de54bf2c805573d6e17b03850d7049d8583..69a9bf533e5060afee69bc2b525b6971e85ffd05 100644
--- a/extensions/browser/lazy_background_task_queue.cc
+++ b/extensions/browser/lazy_background_task_queue.cc
@@ -66,10 +66,10 @@ void LazyBackgroundTaskQueue::AddPendingTask(
const std::string& extension_id,
const PendingTask& task) {
if (ExtensionsBrowserClient::Get()->IsShuttingDown()) {
- task.Run(NULL);
+ task.Run(nullptr);
return;
}
- PendingTasksList* tasks_list = NULL;
+ PendingTasksList* tasks_list = nullptr;
PendingTasksKey key(browser_context, extension_id);
PendingTasksMap::iterator it = pending_tasks_.find(key);
if (it == pending_tasks_.end()) {
@@ -89,7 +89,7 @@ void LazyBackgroundTaskQueue::AddPendingTask(
// but the extension isn't enabled in incognito mode.
if (!pm->CreateBackgroundHost(
extension, BackgroundInfo::GetBackgroundURL(extension))) {
- task.Run(NULL);
+ task.Run(nullptr);
return;
}
}
@@ -161,7 +161,7 @@ void LazyBackgroundTaskQueue::Observe(
ExtensionHost* host =
content::Details<ExtensionHost>(details).ptr();
if (host->extension_host_type() == VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) {
- ProcessPendingTasks(NULL, browser_context, host->extension());
+ ProcessPendingTasks(nullptr, browser_context, host->extension());
}
break;
}
@@ -176,12 +176,12 @@ void LazyBackgroundTaskQueue::OnExtensionUnloaded(
const Extension* extension,
UnloadedExtensionInfo::Reason reason) {
// Notify consumers that the page failed to load.
- ProcessPendingTasks(NULL, browser_context, extension);
+ ProcessPendingTasks(nullptr, browser_context, extension);
// If this extension is also running in an off-the-record context, notify that
// task queue as well.
ExtensionsBrowserClient* browser_client = ExtensionsBrowserClient::Get();
if (browser_client->HasOffTheRecordContext(browser_context)) {
- ProcessPendingTasks(NULL,
+ ProcessPendingTasks(nullptr,
browser_client->GetOffTheRecordContext(browser_context),
extension);
}

Powered by Google App Engine
This is Rietveld 408576698