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

Unified Diff: chrome/browser/chromeos/file_manager/arc_file_tasks.cc

Issue 2337193005: Consolidate 4 GetIntentHelper functions (Closed)
Patch Set: Address comments2 Created 4 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: chrome/browser/chromeos/file_manager/arc_file_tasks.cc
diff --git a/chrome/browser/chromeos/file_manager/arc_file_tasks.cc b/chrome/browser/chromeos/file_manager/arc_file_tasks.cc
index ebb52da72e5f1b4b09c95c9651ca2f899642688b..215ce34759fc5e008360ac1a91d976c720431a76 100644
--- a/chrome/browser/chromeos/file_manager/arc_file_tasks.cc
+++ b/chrome/browser/chromeos/file_manager/arc_file_tasks.cc
@@ -58,21 +58,7 @@ arc::mojom::IntentHelperInstance* GetArcIntentHelper(Profile* profile,
// File manager in secondary profile cannot access ARC.
if (!chromeos::ProfileHelper::IsPrimaryProfile(profile))
return nullptr;
-
- arc::ArcBridgeService* arc_service = arc::ArcBridgeService::Get();
- if (!arc_service)
- return nullptr;
-
- arc::mojom::IntentHelperInstance* intent_helper_instance =
- arc_service->intent_helper()->instance();
- if (!intent_helper_instance)
- return nullptr;
-
- if (arc_service->intent_helper()->version() < min_version) {
- DLOG(WARNING) << "ARC intent helper instance is too old.";
- return nullptr;
- }
- return intent_helper_instance;
+ return arc::ArcIntentHelperBridge::GetIntentHelperInstance(min_version);
}
// Returns the icon loader that wraps the Mojo interface for ARC Intent Helper.
« no previous file with comments | « chrome/browser/chromeos/arc/arc_navigation_throttle.cc ('k') | components/arc/intent_helper/activity_icon_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698