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

Side by Side Diff: chrome/browser/media/router/media_router_factory.h

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/internal_auth.cc ('k') | chrome/browser/media/router/media_router_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_FACTORY_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_FACTORY_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_FACTORY_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_FACTORY_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 14 matching lines...) Expand all
25 static MediaRouter* GetApiForBrowserContext(content::BrowserContext* context); 25 static MediaRouter* GetApiForBrowserContext(content::BrowserContext* context);
26 26
27 static MediaRouterFactory* GetInstance(); 27 static MediaRouterFactory* GetInstance();
28 28
29 protected: 29 protected:
30 // We override the shutdown method for the factory to give the Media Router a 30 // We override the shutdown method for the factory to give the Media Router a
31 // chance to remove incognito media routes. 31 // chance to remove incognito media routes.
32 void BrowserContextShutdown(content::BrowserContext* context) override; 32 void BrowserContextShutdown(content::BrowserContext* context) override;
33 33
34 private: 34 private:
35 friend struct base::DefaultLazyInstanceTraits<MediaRouterFactory>; 35 friend struct base::LazyInstanceTraitsBase<MediaRouterFactory>;
36 FRIEND_TEST_ALL_PREFIXES(MediaRouterFactoryTest, 36 FRIEND_TEST_ALL_PREFIXES(MediaRouterFactoryTest,
37 IncognitoBrowserContextShutdown); 37 IncognitoBrowserContextShutdown);
38 38
39 MediaRouterFactory(); 39 MediaRouterFactory();
40 ~MediaRouterFactory() override; 40 ~MediaRouterFactory() override;
41 41
42 // BrowserContextKeyedServiceFactory interface. 42 // BrowserContextKeyedServiceFactory interface.
43 content::BrowserContext* GetBrowserContextToUse( 43 content::BrowserContext* GetBrowserContextToUse(
44 content::BrowserContext* context) const override; 44 content::BrowserContext* context) const override;
45 45
46 KeyedService* BuildServiceInstanceFor( 46 KeyedService* BuildServiceInstanceFor(
47 content::BrowserContext* context) const override; 47 content::BrowserContext* context) const override;
48 48
49 DISALLOW_COPY_AND_ASSIGN(MediaRouterFactory); 49 DISALLOW_COPY_AND_ASSIGN(MediaRouterFactory);
50 }; 50 };
51 51
52 } // namespace media_router 52 } // namespace media_router
53 53
54 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_FACTORY_H_ 54 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/internal_auth.cc ('k') | chrome/browser/media/router/media_router_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698