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

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

Issue 648653003: Standardize usage of virtual/override/final in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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/persistent_tab_restore_service.h" 5 #include "chrome/browser/sessions/persistent_tab_restore_service.h"
6 6
7 #include <cstring> // memcpy 7 #include <cstring> // memcpy
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 // PersistentTabRestoreService::Delegate --------------------------------------- 113 // PersistentTabRestoreService::Delegate ---------------------------------------
114 114
115 // Implements the link between the tab restore service and the session backend. 115 // Implements the link between the tab restore service and the session backend.
116 class PersistentTabRestoreService::Delegate 116 class PersistentTabRestoreService::Delegate
117 : public BaseSessionService, 117 : public BaseSessionService,
118 public TabRestoreServiceHelper::Observer { 118 public TabRestoreServiceHelper::Observer {
119 public: 119 public:
120 explicit Delegate(Profile* profile); 120 explicit Delegate(Profile* profile);
121 121
122 virtual ~Delegate(); 122 ~Delegate() override;
123 123
124 // BaseSessionService: 124 // BaseSessionService:
125 virtual void Save() override; 125 void Save() override;
126 126
127 // TabRestoreServiceHelper::Observer: 127 // TabRestoreServiceHelper::Observer:
128 virtual void OnClearEntries() override; 128 void OnClearEntries() override;
129 virtual void OnRestoreEntryById( 129 void OnRestoreEntryById(SessionID::id_type id,
130 SessionID::id_type id, 130 Entries::const_iterator entry_iterator) override;
131 Entries::const_iterator entry_iterator) override; 131 void OnAddEntry() override;
132 virtual void OnAddEntry() override;
133 132
134 void set_tab_restore_service_helper( 133 void set_tab_restore_service_helper(
135 TabRestoreServiceHelper* tab_restore_service_helper) { 134 TabRestoreServiceHelper* tab_restore_service_helper) {
136 tab_restore_service_helper_ = tab_restore_service_helper; 135 tab_restore_service_helper_ = tab_restore_service_helper;
137 } 136 }
138 137
139 void LoadTabsFromLastSession(); 138 void LoadTabsFromLastSession();
140 139
141 bool IsLoaded() const; 140 bool IsLoaded() const;
142 141
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 } 982 }
984 983
985 void PersistentTabRestoreService::PruneEntries() { 984 void PersistentTabRestoreService::PruneEntries() {
986 helper_.PruneEntries(); 985 helper_.PruneEntries();
987 } 986 }
988 987
989 KeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor( 988 KeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor(
990 content::BrowserContext* profile) const { 989 content::BrowserContext* profile) const {
991 return new PersistentTabRestoreService(static_cast<Profile*>(profile), NULL); 990 return new PersistentTabRestoreService(static_cast<Profile*>(profile), NULL);
992 } 991 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698