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

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

Issue 10989027: Split TabRestoreService into InMemoryTRS and PersistentTRS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Scott's comments Created 8 years, 2 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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698