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

Unified Diff: chrome/browser/speech/tts_chromeos.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
Index: chrome/browser/speech/tts_chromeos.cc
diff --git a/chrome/browser/speech/tts_chromeos.cc b/chrome/browser/speech/tts_chromeos.cc
index d7f9465f98fd474e365668aec5b8b41e0140da3a..cb7749a692764219bb29b167184cad03927366c0 100644
--- a/chrome/browser/speech/tts_chromeos.cc
+++ b/chrome/browser/speech/tts_chromeos.cc
@@ -5,6 +5,7 @@
#include "base/macros.h"
#include "chrome/browser/speech/tts_platform.h"
#include "components/arc/arc_bridge_service.h"
+#include "components/arc/arc_service_manager.h"
#include "components/arc/common/tts.mojom.h"
#include "content/public/browser/browser_thread.h"
@@ -17,10 +18,12 @@ constexpr uint32_t kDefaultMinVersion = 0;
arc::mojom::TtsInstance* GetArcTts(const std::string& method_name_for_logging,
uint32_t min_version) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- return arc::ArcBridgeService::Get()
- ? arc::ArcBridgeService::Get()->tts()->GetInstanceForMethod(
- method_name_for_logging, min_version)
- : nullptr;
+ auto* const arc_service_manager = arc::ArcServiceManager::Get();
+ if (!arc_service_manager)
+ return nullptr;
+
+ return arc_service_manager->arc_bridge_service()->tts()->GetInstanceForMethod(
+ method_name_for_logging, min_version);
}
} // namespace
@@ -31,8 +34,11 @@ class TtsPlatformImplChromeOs : public TtsPlatformImpl {
public:
// TtsPlatformImpl overrides:
bool PlatformImplAvailable() override {
- return arc::ArcBridgeService::Get() &&
- arc::ArcBridgeService::Get()->tts()->has_instance();
+ return arc::ArcServiceManager::Get() &&
+ arc::ArcServiceManager::Get()
+ ->arc_bridge_service()
+ ->tts()
+ ->has_instance();
}
bool LoadBuiltInTtsExtension(
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/task_manager/providers/arc/arc_process_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698