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

Side by Side Diff: chrome/browser/sessions/tab_restore_service.h

Issue 8776018: fix tab restore service crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: always prune Created 9 years 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
« no previous file with comments | « no previous file | chrome/browser/sessions/tab_restore_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_
6 #define CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ 6 #define CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <set> 10 #include <set>
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // Creates and add entries to |entries| for each of the windows in |windows|. 170 // Creates and add entries to |entries| for each of the windows in |windows|.
171 void CreateEntriesFromWindows(std::vector<SessionWindow*>* windows, 171 void CreateEntriesFromWindows(std::vector<SessionWindow*>* windows,
172 std::vector<Entry*>* entries); 172 std::vector<Entry*>* entries);
173 173
174 protected: 174 protected:
175 virtual void Save() OVERRIDE; 175 virtual void Save() OVERRIDE;
176 176
177 private: 177 private:
178 friend class TabRestoreServiceTest; 178 friend class TabRestoreServiceTest;
179 FRIEND_TEST_ALL_PREFIXES(TabRestoreServiceTest, PruneEntries); 179 FRIEND_TEST_ALL_PREFIXES(TabRestoreServiceTest, PruneEntries);
180 FRIEND_TEST_ALL_PREFIXES(TabRestoreServiceTest, PruneIsCalled);
180 181
181 // Used to indicate what has loaded. 182 // Used to indicate what has loaded.
182 enum LoadState { 183 enum LoadState {
183 // Indicates we haven't loaded anything. 184 // Indicates we haven't loaded anything.
184 NOT_LOADED = 1 << 0, 185 NOT_LOADED = 1 << 0,
185 186
186 // Indicates we've asked for the last sessions and tabs but haven't gotten 187 // Indicates we've asked for the last sessions and tabs but haven't gotten
187 // the result back yet. 188 // the result back yet.
188 LOADING = 1 << 2, 189 LOADING = 1 << 2,
189 190
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 // loading LoadStateChanged is invoked, which adds these entries to 356 // loading LoadStateChanged is invoked, which adds these entries to
356 // entries_. 357 // entries_.
357 std::vector<Entry*> staging_entries_; 358 std::vector<Entry*> staging_entries_;
358 359
359 TimeFactory* time_factory_; 360 TimeFactory* time_factory_;
360 361
361 DISALLOW_COPY_AND_ASSIGN(TabRestoreService); 362 DISALLOW_COPY_AND_ASSIGN(TabRestoreService);
362 }; 363 };
363 364
364 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ 365 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sessions/tab_restore_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698