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

Unified Diff: chrome/browser/sync/test/integration/sync_arc_package_helper.cc

Issue 2357053002: Always use arc::InstanceHolder<T>::GetInstanceForMethod (Closed)
Patch Set: rebase, no code change 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
« 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/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 fac2adf67c409c01a9e7741db776b6637eb7b656..206bf4db0700581aee857a8fc17e6823b4eada53 100644
--- a/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
+++ b/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
@@ -4,8 +4,10 @@
#include "chrome/browser/sync/test/integration/sync_arc_package_helper.h"
+#include <memory>
#include <string>
#include <unordered_map>
+#include <vector>
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
@@ -171,7 +173,8 @@ void SyncArcPackageHelper::InstallPackage(
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()->instance());
+ arc_app_list_prefs->app_instance_holder()->GetInstanceForMethod(
+ "InstallPackage"));
DCHECK(fake_app_instance);
// After this function, new package should be added to local sync service
@@ -184,7 +187,8 @@ void SyncArcPackageHelper::UninstallPackage(Profile* profile,
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()->instance());
+ arc_app_list_prefs->app_instance_holder()->GetInstanceForMethod(
+ "UninstallPackage"));
DCHECK(fake_app_instance);
// After this function, package should be removed from local sync service
// and uninstall event should be sent to sync server.
« 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