Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/browser/sessions/tab_restore_service_factory.h" | 5 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile_dependency_manager.h" | 7 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 8 #include "chrome/browser/sessions/in_memory_tab_restore_service.h" | |
|
sky
2012/10/25 00:45:44
Remove these includes.
Philippe
2012/10/25 15:37:07
Done.
| |
| 9 #include "chrome/browser/sessions/persistent_tab_restore_service.h" | |
| 8 #include "chrome/browser/sessions/tab_restore_service.h" | 10 #include "chrome/browser/sessions/tab_restore_service.h" |
| 9 | 11 |
| 10 // static | 12 // static |
| 11 TabRestoreService* TabRestoreServiceFactory::GetForProfile(Profile* profile) { | 13 TabRestoreService* TabRestoreServiceFactory::GetForProfile(Profile* profile) { |
| 12 return static_cast<TabRestoreService*>( | 14 return static_cast<TabRestoreService*>( |
| 13 GetInstance()->GetServiceForProfile(profile, true)); | 15 GetInstance()->GetServiceForProfile(profile, true)); |
| 14 } | 16 } |
| 15 | 17 |
| 16 // static | 18 // static |
| 17 TabRestoreService* TabRestoreServiceFactory::GetForProfileIfExisting( | 19 TabRestoreService* TabRestoreServiceFactory::GetForProfileIfExisting( |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 32 } | 34 } |
| 33 | 35 |
| 34 TabRestoreServiceFactory::TabRestoreServiceFactory() | 36 TabRestoreServiceFactory::TabRestoreServiceFactory() |
| 35 : ProfileKeyedServiceFactory("TabRestoreService", | 37 : ProfileKeyedServiceFactory("TabRestoreService", |
| 36 ProfileDependencyManager::GetInstance()) { | 38 ProfileDependencyManager::GetInstance()) { |
| 37 } | 39 } |
| 38 | 40 |
| 39 TabRestoreServiceFactory::~TabRestoreServiceFactory() { | 41 TabRestoreServiceFactory::~TabRestoreServiceFactory() { |
| 40 } | 42 } |
| 41 | 43 |
| 42 ProfileKeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor( | |
| 43 Profile* profile) const { | |
| 44 TabRestoreService* service = NULL; | |
| 45 service = new TabRestoreService(profile); | |
| 46 return service; | |
| 47 } | |
| 48 | |
| 49 bool TabRestoreServiceFactory::ServiceIsNULLWhileTesting() const { | 44 bool TabRestoreServiceFactory::ServiceIsNULLWhileTesting() const { |
| 50 return true; | 45 return true; |
| 51 } | 46 } |
| OLD | NEW |