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

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

Issue 2753753005: [sync] WebContentsObserver based sessions notifications (Closed)
Patch Set: [sync] WebContentsObserver based sessions notifications 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 #include "chrome/browser/sync/sessions/sync_sessions_web_contents_router_factory .h"
5
6 #include "base/logging.h"
7 #include "base/memory/singleton.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/sync/sessions/sync_sessions_web_contents_router.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
11
12 namespace sync_sessions {
Nicolas Zea 2017/03/16 19:57:43 nit: newline below
Patrick Noland 2017/03/17 00:20:10 Done.
13 // static
14 SyncSessionsWebContentsRouter*
15 SyncSessionsWebContentsRouterFactory::GetForProfile(Profile* profile) {
16 return static_cast<SyncSessionsWebContentsRouter*>(
17 GetInstance()->GetServiceForBrowserContext(profile, true));
18 }
19
20 // static
21 SyncSessionsWebContentsRouterFactory*
22 SyncSessionsWebContentsRouterFactory::GetInstance() {
23 return base::Singleton<SyncSessionsWebContentsRouterFactory>::get();
24 }
25
26 SyncSessionsWebContentsRouterFactory::SyncSessionsWebContentsRouterFactory()
27 : BrowserContextKeyedServiceFactory(
28 "SyncSessionsWebContentsRouter",
29 BrowserContextDependencyManager::GetInstance()) {}
30
31 SyncSessionsWebContentsRouterFactory::~SyncSessionsWebContentsRouterFactory() {}
32
33 KeyedService* SyncSessionsWebContentsRouterFactory::BuildServiceInstanceFor(
34 content::BrowserContext* context) const {
35 return new SyncSessionsWebContentsRouter(static_cast<Profile*>(context));
36 }
37
38 } // namespace sync_sessions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698