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

Side by Side Diff: chrome/browser/sessions/app_restore_service_factory.cc

Issue 10875027: Restart running apps when chrome restarts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: typo Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 #include "chrome/browser/sessions/app_restore_service_factory.h"
6
7 #include "chrome/browser/profiles/profile_dependency_manager.h"
8 #include "chrome/browser/sessions/app_restore_service.h"
9
10 // static
11 AppRestoreService* AppRestoreServiceFactory::GetForProfile(Profile* profile) {
12 return static_cast<AppRestoreService*>(
13 GetInstance()->GetServiceForProfile(profile, true));
14 }
15
16 // static
17 void AppRestoreServiceFactory::ResetForProfile(Profile* profile) {
18 AppRestoreServiceFactory* factory = GetInstance();
19 factory->ProfileShutdown(profile);
20 factory->ProfileDestroyed(profile);
21 }
22
23 AppRestoreServiceFactory* AppRestoreServiceFactory::GetInstance() {
24 return Singleton<AppRestoreServiceFactory>::get();
25 }
26
27 AppRestoreServiceFactory::AppRestoreServiceFactory()
28 : ProfileKeyedServiceFactory("AppRestoreService",
29 ProfileDependencyManager::GetInstance()) {
30 }
31
32 AppRestoreServiceFactory::~AppRestoreServiceFactory() {
33 }
34
35 ProfileKeyedService* AppRestoreServiceFactory::BuildServiceInstanceFor(
36 Profile* profile) const {
37 AppRestoreService* service = NULL;
38 service = new AppRestoreService(profile);
39 return service;
40 }
41
42 bool AppRestoreServiceFactory::ServiceIsNULLWhileTesting() {
43 return true;
44 }
45
46 bool AppRestoreServiceFactory::ServiceIsCreatedWithProfile() {
47 return true;
48 }
49
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698