OLD | NEW |
---|---|
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 #ifndef CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_ |
6 #define CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_ | 6 #define CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 19 matching lines...) Expand all Loading... | |
30 // session service. It contains commonality needed by both, in particular | 30 // session service. It contains commonality needed by both, in particular |
31 // it manages a set of SessionCommands that are periodically sent to a | 31 // it manages a set of SessionCommands that are periodically sent to a |
32 // SessionBackend. | 32 // SessionBackend. |
33 class BaseSessionService : public CancelableRequestProvider, | 33 class BaseSessionService : public CancelableRequestProvider, |
34 public ProfileKeyedService { | 34 public ProfileKeyedService { |
35 public: | 35 public: |
36 // Identifies the type of session service this is. This is used by the | 36 // Identifies the type of session service this is. This is used by the |
37 // backend to determine the name of the files. | 37 // backend to determine the name of the files. |
38 enum SessionType { | 38 enum SessionType { |
39 SESSION_RESTORE, | 39 SESSION_RESTORE, |
40 TAB_RESTORE | 40 TAB_RESTORE, |
41 APP_RESTORE, | |
Mihai Parparita -not on Chrome
2012/09/04 04:14:48
I don't think you need this enum value (or the cha
koz (OOO until 15th September)
2012/09/04 07:10:20
Done.
| |
41 }; | 42 }; |
42 | 43 |
43 // Creates a new BaseSessionService. After creation you need to invoke | 44 // Creates a new BaseSessionService. After creation you need to invoke |
44 // Init. | 45 // Init. |
45 // |type| gives the type of session service, |profile| the profile and | 46 // |type| gives the type of session service, |profile| the profile and |
46 // |path| the path to save files to. If |profile| is non-NULL, |path| is | 47 // |path| the path to save files to. If |profile| is non-NULL, |path| is |
47 // ignored and instead the path comes from the profile. | 48 // ignored and instead the path comes from the profile. |
48 BaseSessionService(SessionType type, | 49 BaseSessionService(SessionType type, |
49 Profile* profile, | 50 Profile* profile, |
50 const FilePath& path); | 51 const FilePath& path); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
203 // over the commands. | 204 // over the commands. |
204 bool pending_reset_; | 205 bool pending_reset_; |
205 | 206 |
206 // The number of commands sent to the backend before doing a reset. | 207 // The number of commands sent to the backend before doing a reset. |
207 int commands_since_reset_; | 208 int commands_since_reset_; |
208 | 209 |
209 DISALLOW_COPY_AND_ASSIGN(BaseSessionService); | 210 DISALLOW_COPY_AND_ASSIGN(BaseSessionService); |
210 }; | 211 }; |
211 | 212 |
212 #endif // CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_ | 213 #endif // CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_ |
OLD | NEW |