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

Side by Side Diff: chrome/browser/sessions/in_memory_tab_restore_service.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, 1 month 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/in_memory_tab_restore_service.h"
6
7 #include "base/compiler_specific.h"
8 #include "base/logging.h"
9 #include "chrome/browser/sessions/tab_restore_service_factory.h"
10
11 InMemoryTabRestoreService::InMemoryTabRestoreService(
12 Profile* profile,
13 TabRestoreService::TimeFactory* time_factory)
14 : ALLOW_THIS_IN_INITIALIZER_LIST(
15 helper_(this, NULL, profile, time_factory)) {
16 }
17
18 InMemoryTabRestoreService::~InMemoryTabRestoreService() {}
19
20 void InMemoryTabRestoreService::AddObserver(
21 TabRestoreServiceObserver* observer) {
22 helper_.AddObserver(observer);
23 }
24
25 void InMemoryTabRestoreService::RemoveObserver(
26 TabRestoreServiceObserver* observer) {
27 helper_.RemoveObserver(observer);
28 }
29
30 void InMemoryTabRestoreService::CreateHistoricalTab(
31 content::WebContents* contents,
32 int index) {
33 helper_.CreateHistoricalTab(contents, index);
34 }
35
36 void InMemoryTabRestoreService::BrowserClosing(
37 TabRestoreServiceDelegate* delegate) {
38 helper_.BrowserClosing(delegate);
39 }
40
41 void InMemoryTabRestoreService::BrowserClosed(
42 TabRestoreServiceDelegate* delegate) {
43 helper_.BrowserClosed(delegate);
44 }
45
46 void InMemoryTabRestoreService::ClearEntries() {
47 helper_.ClearEntries();
48 }
49
50 const TabRestoreService::Entries& InMemoryTabRestoreService::entries() const {
51 return helper_.entries();
52 }
53
54 void InMemoryTabRestoreService::RestoreMostRecentEntry(
55 TabRestoreServiceDelegate* delegate) {
56 helper_.RestoreMostRecentEntry(delegate);
57 }
58
59 TabRestoreService::Tab* InMemoryTabRestoreService::RemoveTabEntryById(
60 SessionID::id_type id) {
61 return helper_.RemoveTabEntryById(id);
62 }
63
64 void InMemoryTabRestoreService::RestoreEntryById(
65 TabRestoreServiceDelegate* delegate,
66 SessionID::id_type id,
67 WindowOpenDisposition disposition) {
68 helper_.RestoreEntryById(delegate, id, disposition);
69 }
70
71 void InMemoryTabRestoreService::LoadTabsFromLastSession() {
72 NOTIMPLEMENTED();
sky 2012/10/25 00:45:44 NOTIMPLEMENTED doesn't seem right here. I think yo
Philippe 2012/10/25 15:37:07 Done.
73 }
74
75 bool InMemoryTabRestoreService::IsLoaded() const {
76 NOTIMPLEMENTED();
77 return true;
78 }
79
80 void InMemoryTabRestoreService::DeleteLastSession() {
81 NOTIMPLEMENTED();
82 }
83
84 void InMemoryTabRestoreService::Shutdown() {
85 }
86
87 ProfileKeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor(
88 Profile* profile) const {
89 return new InMemoryTabRestoreService(profile, NULL);
90 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698