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

Unified Diff: chrome/browser/sync/test/integration/sync_arc_package_helper.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
Index: chrome/browser/sync/test/integration/sync_arc_package_helper.cc
diff --git a/chrome/browser/sync/test/integration/sync_arc_package_helper.cc b/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
index 7055a910dc77b0289733e96b4e624a5446baa4c4..7632bd224ed41c6cf21df0891c68c29da15e8c67 100644
--- a/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
+++ b/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
@@ -183,27 +183,25 @@ void SyncArcPackageHelper::InstallPackage(
const mojom::ArcPackageInfo& package) {
ArcAppListPrefs* arc_app_list_prefs = ArcAppListPrefs::Get(profile);
DCHECK(arc_app_list_prefs);
- FakeAppInstance* fake_app_instance = static_cast<FakeAppInstance*>(
- arc_app_list_prefs->app_instance_holder()->GetInstanceForMethod(
- "InstallPackage"));
+ mojom::AppInstance* app_instance = ARC_GET_INSTANCE_FOR_METHOD(
+ arc_app_list_prefs->app_instance_holder(), InstallPackage);
- DCHECK(fake_app_instance);
+ DCHECK(app_instance);
// After this function, new package should be added to local sync service
// and install event should be sent to sync server.
- fake_app_instance->InstallPackage(package.Clone());
+ app_instance->InstallPackage(package.Clone());
}
void SyncArcPackageHelper::UninstallPackage(Profile* profile,
const std::string& package_name) {
ArcAppListPrefs* arc_app_list_prefs = ArcAppListPrefs::Get(profile);
DCHECK(arc_app_list_prefs);
- FakeAppInstance* fake_app_instance = static_cast<FakeAppInstance*>(
- arc_app_list_prefs->app_instance_holder()->GetInstanceForMethod(
- "UninstallPackage"));
- DCHECK(fake_app_instance);
+ mojom::AppInstance* app_instance = ARC_GET_INSTANCE_FOR_METHOD(
+ arc_app_list_prefs->app_instance_holder(), UninstallPackage);
+ DCHECK(app_instance);
// After this function, package should be removed from local sync service
// and uninstall event should be sent to sync server.
- fake_app_instance->UninstallPackage(package_name);
+ app_instance->UninstallPackage(package_name);
}
// Packages from local pref are used for these test functions. Packages in local
« no previous file with comments | « chrome/browser/speech/tts_chromeos.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