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

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

Issue 694813003: Changing SessionService to have a BaseSessionService, not being one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed browser tests Created 6 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
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_SESSION_BACKEND_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_BACKEND_H_
6 #define CHROME_BROWSER_SESSIONS_SESSION_BACKEND_H_ 6 #define CHROME_BROWSER_SESSIONS_SESSION_BACKEND_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 bool inited() const { return inited_; } 57 bool inited() const { return inited_; }
58 58
59 // Appends the specified commands to the current file. If reset_first is 59 // Appends the specified commands to the current file. If reset_first is
60 // true the the current file is recreated. 60 // true the the current file is recreated.
61 void AppendCommands(ScopedVector<SessionCommand> commands, bool reset_first); 61 void AppendCommands(ScopedVector<SessionCommand> commands, bool reset_first);
62 62
63 // Invoked from the service to read the commands that make up the last 63 // Invoked from the service to read the commands that make up the last
64 // session, invokes ReadLastSessionCommandsImpl to do the work. 64 // session, invokes ReadLastSessionCommandsImpl to do the work.
65 void ReadLastSessionCommands( 65 void ReadLastSessionCommands(
66 const base::CancelableTaskTracker::IsCanceledCallback& is_canceled, 66 const base::CancelableTaskTracker::IsCanceledCallback& is_canceled,
67 const BaseSessionService::InternalGetCommandsCallback& callback); 67 const BaseSessionService::GetCommandsCallback& callback);
68 68
69 // Reads the commands from the last file. 69 // Reads the commands from the last file.
70 // 70 //
71 // On success, the read commands are added to commands. 71 // On success, the read commands are added to commands.
72 bool ReadLastSessionCommandsImpl(ScopedVector<SessionCommand>* commands); 72 bool ReadLastSessionCommandsImpl(ScopedVector<SessionCommand>* commands);
73 73
74 // Deletes the file containing the commands for the last session. 74 // Deletes the file containing the commands for the last session.
75 void DeleteLastSession(); 75 void DeleteLastSession();
76 76
77 // Moves the current session to the last and resets the current. This is 77 // Moves the current session to the last and resets the current. This is
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // Main thread, all others on the IO thread, hence lazy initialization. 127 // Main thread, all others on the IO thread, hence lazy initialization.
128 bool inited_; 128 bool inited_;
129 129
130 // If true, the file is empty (no commands have been added to it). 130 // If true, the file is empty (no commands have been added to it).
131 bool empty_file_; 131 bool empty_file_;
132 132
133 DISALLOW_COPY_AND_ASSIGN(SessionBackend); 133 DISALLOW_COPY_AND_ASSIGN(SessionBackend);
134 }; 134 };
135 135
136 #endif // CHROME_BROWSER_SESSIONS_SESSION_BACKEND_H_ 136 #endif // CHROME_BROWSER_SESSIONS_SESSION_BACKEND_H_
OLDNEW
« no previous file with comments | « chrome/browser/sessions/persistent_tab_restore_service.cc ('k') | chrome/browser/sessions/session_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698