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

Side by Side Diff: chrome/browser/sync/sessions/sync_sessions_web_contents_router_factory.h

Issue 2753753005: [sync] WebContentsObserver based sessions notifications (Closed)
Patch Set: use base:MakeUnique, alphabetize 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_WEB_CONTENTS_ROUTER_FACTORY_H _
6 #define CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_WEB_CONTENTS_ROUTER_FACTORY_H _
7
8 #include "base/macros.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
10
11 class Profile;
12
13 namespace base {
14 template <typename T>
15 struct DefaultSingletonTraits;
16 } // namespace base
17
18 namespace sync_sessions {
19
20 class SyncSessionsWebContentsRouter;
21
22 class SyncSessionsWebContentsRouterFactory
23 : public BrowserContextKeyedServiceFactory {
24 public:
25 // Get the SyncSessionsWebContentsRouter service for |profile|, creating one
26 // if needed.
27 static SyncSessionsWebContentsRouter* GetForProfile(Profile* profile);
28
29 // Get the singleton instance of the factory.
30 static SyncSessionsWebContentsRouterFactory* GetInstance();
31
32 // Creates a SyncSessionsWebContentsRouter service for |context|.
33 static SyncSessionsWebContentsRouter* BuildSyncSessionsWebContentsRouter(
34 content::BrowserContext* context);
35
36 private:
37 friend struct base::DefaultSingletonTraits<
38 SyncSessionsWebContentsRouterFactory>;
39
40 SyncSessionsWebContentsRouterFactory();
41 ~SyncSessionsWebContentsRouterFactory() override;
42
43 // Overridden from BrowserContextKeyedServiceFactory.
44 KeyedService* BuildServiceInstanceFor(
45 content::BrowserContext* context) const override;
46
47 DISALLOW_COPY_AND_ASSIGN(SyncSessionsWebContentsRouterFactory);
48 };
49
50 } // namespace sync_sessions
51
52 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_WEB_CONTENTS_ROUTER_FACTOR Y_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698