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

Unified Diff: content/common/service_manager/embedded_service_runner.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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/common/service_manager/embedded_service_runner.cc
diff --git a/content/common/service_manager/embedded_service_runner.cc b/content/common/service_manager/embedded_service_runner.cc
index 438a1e65d9d876202da2e9630b028e7a2992762a..0c7c45890da1eb08815a88162394c6fd70744953 100644
--- a/content/common/service_manager/embedded_service_runner.cc
+++ b/content/common/service_manager/embedded_service_runner.cc
@@ -81,18 +81,14 @@ class EmbeddedServiceRunner::InstanceManager
DCHECK(service_task_runner_->BelongsToCurrentThread());
int instance_id = next_instance_id_++;
- base::Closure quit_closure =
- base::Bind(&InstanceManager::OnInstanceLost, this, instance_id);
- // TODO(rockot): Get rid of the quit closure argument to the factory
- // function. Services should request termination via their ServiceContext
- // once we have that working.
std::unique_ptr<service_manager::ServiceContext> context =
base::MakeUnique<service_manager::ServiceContext>(
- factory_callback_.Run(quit_closure), std::move(request));
+ factory_callback_.Run(), std::move(request));
service_manager::ServiceContext* raw_context = context.get();
- context->SetConnectionLostClosure(quit_closure);
+ context->SetConnectionLostClosure(
+ base::Bind(&InstanceManager::OnInstanceLost, this, instance_id));
contexts_.insert(std::make_pair(raw_context, std::move(context)));
id_to_context_map_.insert(std::make_pair(instance_id, raw_context));
}
« no previous file with comments | « content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698