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

Unified Diff: components/arc/storage_manager/arc_storage_manager.cc

Issue 2599673005: arc: Use GET_INTERFACE_FOR_METHOD macro (Closed)
Patch Set: Addressed feedback Created 3 years, 11 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
« no previous file with comments | « components/arc/power/arc_power_bridge.cc ('k') | ui/arc/notification/arc_notification_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/storage_manager/arc_storage_manager.cc
diff --git a/components/arc/storage_manager/arc_storage_manager.cc b/components/arc/storage_manager/arc_storage_manager.cc
index f8cae30155e9faa45e2fb443bdc72acd4c4abc04..c87a065f91b65ae60a7cbf556e4b27ddf8ad5f30 100644
--- a/components/arc/storage_manager/arc_storage_manager.cc
+++ b/components/arc/storage_manager/arc_storage_manager.cc
@@ -14,8 +14,6 @@ namespace arc {
namespace {
-const int kMinInstanceVersion = 1; // See storage_manager.mojom.
-
// This class is owned by ArcServiceManager so that it is safe to use this raw
// pointer as the singleton reference.
ArcStorageManager* g_arc_storage_manager = nullptr;
@@ -40,9 +38,8 @@ ArcStorageManager* ArcStorageManager::Get() {
}
bool ArcStorageManager::OpenPrivateVolumeSettings() {
- auto* storage_manager_instance =
- arc_bridge_service()->storage_manager()->GetInstanceForMethod(
- "OpenPrivateVolumeSettings", kMinInstanceVersion);
+ auto* storage_manager_instance = ARC_GET_INSTANCE_FOR_METHOD(
+ arc_bridge_service()->storage_manager(), OpenPrivateVolumeSettings);
if (!storage_manager_instance)
return false;
storage_manager_instance->OpenPrivateVolumeSettings();
@@ -51,9 +48,8 @@ bool ArcStorageManager::OpenPrivateVolumeSettings() {
bool ArcStorageManager::GetApplicationsSize(
const GetApplicationsSizeCallback& callback) {
- auto* storage_manager_instance =
- arc_bridge_service()->storage_manager()->GetInstanceForMethod(
- "GetApplicationsSize", kMinInstanceVersion);
+ auto* storage_manager_instance = ARC_GET_INSTANCE_FOR_METHOD(
+ arc_bridge_service()->storage_manager(), GetApplicationsSize);
if (!storage_manager_instance)
return false;
storage_manager_instance->GetApplicationsSize(callback);
@@ -62,9 +58,8 @@ bool ArcStorageManager::GetApplicationsSize(
bool ArcStorageManager::DeleteApplicationsCache(
const base::Callback<void()>& callback) {
- auto* storage_manager_instance =
- arc_bridge_service()->storage_manager()->GetInstanceForMethod(
- "DeleteApplicationsCache", kMinInstanceVersion);
+ auto* storage_manager_instance = ARC_GET_INSTANCE_FOR_METHOD(
+ arc_bridge_service()->storage_manager(), DeleteApplicationsCache);
if (!storage_manager_instance)
return false;
storage_manager_instance->DeleteApplicationsCache(callback);
« no previous file with comments | « components/arc/power/arc_power_bridge.cc ('k') | ui/arc/notification/arc_notification_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698