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

Side by Side Diff: apps/browser_context_keyed_service_factories.cc

Issue 2789253003: Add chrome/browser/apps/BUILD.gn and move Chrome-specific code there (Closed)
Patch Set: rebase Created 3 years, 8 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 | « apps/browser_context_keyed_service_factories.h ('k') | apps/saved_files_service.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "apps/browser_context_keyed_service_factories.h" 5 #include "apps/browser_context_keyed_service_factories.h"
6 6
7 #include "apps/app_load_service_factory.h" 7 #include "apps/app_restore_service.h"
8 #include "apps/app_restore_service_factory.h" 8 #include "apps/app_restore_service_factory.h"
9 #include "apps/saved_files_service.h"
10 #include "apps/saved_files_service_factory.h"
11 #include "content/public/browser/browser_context.h"
9 #include "extensions/browser/app_window/app_window_geometry_cache.h" 12 #include "extensions/browser/app_window/app_window_geometry_cache.h"
10 13
11 namespace apps { 14 namespace apps {
12 15
13 void EnsureBrowserContextKeyedServiceFactoriesBuilt() { 16 void EnsureBrowserContextKeyedServiceFactoriesBuilt() {
14 apps::AppLoadServiceFactory::GetInstance();
15 apps::AppRestoreServiceFactory::GetInstance(); 17 apps::AppRestoreServiceFactory::GetInstance();
16 extensions::AppWindowGeometryCache::Factory::GetInstance(); 18 extensions::AppWindowGeometryCache::Factory::GetInstance();
17 } 19 }
18 20
21 void NotifyApplicationTerminating(content::BrowserContext* browser_context) {
22 AppRestoreService* restore_service =
23 AppRestoreServiceFactory::GetForBrowserContext(browser_context);
24 CHECK(restore_service);
25 restore_service->OnApplicationTerminating();
26
27 SavedFilesService* saved_files_service =
28 SavedFilesServiceFactory::GetForBrowserContextIfExists(browser_context);
29 if (saved_files_service)
30 saved_files_service->OnApplicationTerminating();
31 }
32
19 } // namespace apps 33 } // namespace apps
OLDNEW
« no previous file with comments | « apps/browser_context_keyed_service_factories.h ('k') | apps/saved_files_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698