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

Unified Diff: chrome/browser/task_manager/providers/arc/arc_process_task.cc

Issue 2557513004: Remove explicit singletonness of ArcBridgeService part 3. (Closed)
Patch Set: Address comments. Created 4 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
« no previous file with comments | « chrome/browser/speech/tts_chromeos.cc ('k') | chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager/providers/arc/arc_process_task.cc
diff --git a/chrome/browser/task_manager/providers/arc/arc_process_task.cc b/chrome/browser/task_manager/providers/arc/arc_process_task.cc
index b664ec7162045ffaa115977fdb9c3b54afa9ad54..bc19b00ffdb1dfb9b4da9076fddb527215eeebfe 100644
--- a/chrome/browser/task_manager/providers/arc/arc_process_task.cc
+++ b/chrome/browser/task_manager/providers/arc/arc_process_task.cc
@@ -107,12 +107,18 @@ void ArcProcessTask::StartIconLoading() {
if (result == arc::ActivityIconLoader::GetResult::FAILED_ARC_NOT_READY) {
// Need to retry loading the icon.
- arc::ArcBridgeService::Get()->intent_helper()->AddObserver(this);
+ arc::ArcServiceManager::Get()
+ ->arc_bridge_service()
+ ->intent_helper()
+ ->AddObserver(this);
}
}
ArcProcessTask::~ArcProcessTask() {
- arc::ArcBridgeService::Get()->intent_helper()->RemoveObserver(this);
+ arc::ArcServiceManager::Get()
+ ->arc_bridge_service()
+ ->intent_helper()
+ ->RemoveObserver(this);
}
Task::Type ArcProcessTask::GetType() const {
@@ -131,8 +137,10 @@ bool ArcProcessTask::IsKillable() {
void ArcProcessTask::Kill() {
auto* process_instance =
- arc::ArcBridgeService::Get()->process()->GetInstanceForMethod(
- "KillProcess", kKillProcessMinInstanceVersion);
+ arc::ArcServiceManager::Get()
+ ->arc_bridge_service()
+ ->process()
+ ->GetInstanceForMethod("KillProcess", kKillProcessMinInstanceVersion);
if (!process_instance)
return;
process_instance->KillProcess(nspid_, "Killed manually from Task Manager");
@@ -143,7 +151,10 @@ void ArcProcessTask::OnInstanceReady() {
VLOG(2) << "intent_helper instance is ready. Fetching the icon for "
<< package_name_;
- arc::ArcBridgeService::Get()->intent_helper()->RemoveObserver(this);
+ arc::ArcServiceManager::Get()
+ ->arc_bridge_service()
+ ->intent_helper()
+ ->RemoveObserver(this);
// Instead of calling into StartIconLoading() directly, return to the main
// loop first to make sure other ArcBridgeService observers are notified.
« no previous file with comments | « chrome/browser/speech/tts_chromeos.cc ('k') | chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698