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

Unified Diff: chrome/browser/media/router/media_router_ui_service_factory.h

Issue 2332693003: Show media router toolbar icon ephemerally for active local routes and issues (Closed)
Patch Set: Modify ToolbarActionsModel 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/media/router/media_router_ui_service_factory.h
diff --git a/chrome/browser/media/router/media_router_ui_service_factory.h b/chrome/browser/media/router/media_router_ui_service_factory.h
index f4d54b4386904650c2f1f996f275600c519561d9..c67224ac77150f5b34fcdf44714f284049277aaa 100644
--- a/chrome/browser/media/router/media_router_ui_service_factory.h
+++ b/chrome/browser/media/router/media_router_ui_service_factory.h
@@ -23,6 +23,10 @@ class MediaRouterUIServiceFactory : public BrowserContextKeyedServiceFactory {
static MediaRouterUIServiceFactory* GetInstance();
+ // By default, this factory returns a NULL service for TestingBrowserContext.
+ // Call this method to make it return a non-NULL service.
+ static void SetUseInTests();
+
private:
friend struct base::DefaultSingletonTraits<MediaRouterUIServiceFactory>;
@@ -34,6 +38,8 @@ class MediaRouterUIServiceFactory : public BrowserContextKeyedServiceFactory {
content::BrowserContext* context) const override;
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
+ bool ServiceIsCreatedWithBrowserContext() const override;
+ bool ServiceIsNULLWhileTesting() const override;
DISALLOW_COPY_AND_ASSIGN(MediaRouterUIServiceFactory);
};

Powered by Google App Engine
This is Rietveld 408576698