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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.h

Issue 2174753004: arc:Integration test for Arc package Chrome sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@current
Patch Set: Modify target Created 4 years, 4 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/ui/app_list/arc/arc_app_list_prefs_factory.h
diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.h b/chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.h
index b13ea20cfa5a8a0ebf1b03de4a811b5dc875a596..24f7fdd62e1d2e5b68bc638004599a43ed91df11 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.h
+++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.h
@@ -6,9 +6,12 @@
#define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_LIST_PREFS_FACTORY_H_
#include <memory>
+#include <unordered_map>
#include "base/macros.h"
#include "base/memory/singleton.h"
+#include "components/arc/common/app.mojom.h"
+#include "components/arc/instance_holder.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
class ArcAppListPrefs;
@@ -20,6 +23,8 @@ class ArcAppListPrefsFactory : public BrowserContextKeyedServiceFactory {
static ArcAppListPrefsFactory* GetInstance();
+ static void SetFactoryForSyncTest();
+
private:
friend struct base::DefaultSingletonTraits<ArcAppListPrefsFactory>;
@@ -31,6 +36,13 @@ class ArcAppListPrefsFactory : public BrowserContextKeyedServiceFactory {
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
+ static bool is_sync_test_;
+
+ mutable std::unordered_map<
+ content::BrowserContext*,
+ std::unique_ptr<arc::InstanceHolder<arc::mojom::AppInstance>>>
+ sync_test_app_instance_holders_;
+
DISALLOW_COPY_AND_ASSIGN(ArcAppListPrefsFactory);
};

Powered by Google App Engine
This is Rietveld 408576698