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

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

Issue 6901031: Profile shouldn't own Session/TabRestore services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again and hope upload works this time Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/sessions/session_restore.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_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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "chrome/browser/profiles/profile_keyed_service.h"
13 #include "chrome/browser/sessions/session_id.h" 14 #include "chrome/browser/sessions/session_id.h"
14 #include "content/browser/cancelable_request.h" 15 #include "content/browser/cancelable_request.h"
15 16
16 class NavigationEntry; 17 class NavigationEntry;
17 class Profile; 18 class Profile;
18 class SessionBackend; 19 class SessionBackend;
19 class SessionCommand; 20 class SessionCommand;
20 class TabNavigation; 21 class TabNavigation;
21 22
22 namespace base { 23 namespace base {
23 class Thread; 24 class Thread;
24 } 25 }
25 26
26 // BaseSessionService is the super class of both tab restore service and 27 // BaseSessionService is the super class of both tab restore service and
27 // session service. It contains commonality needed by both, in particular 28 // session service. It contains commonality needed by both, in particular
28 // it manages a set of SessionCommands that are periodically sent to a 29 // it manages a set of SessionCommands that are periodically sent to a
29 // SessionBackend. 30 // SessionBackend.
30 class BaseSessionService : public CancelableRequestProvider { 31 class BaseSessionService : public CancelableRequestProvider,
32 public ProfileKeyedService {
31 public: 33 public:
32 // Identifies the type of session service this is. This is used by the 34 // Identifies the type of session service this is. This is used by the
33 // backend to determine the name of the files. 35 // backend to determine the name of the files.
34 enum SessionType { 36 enum SessionType {
35 SESSION_RESTORE, 37 SESSION_RESTORE,
36 TAB_RESTORE 38 TAB_RESTORE
37 }; 39 };
38 40
39 // Creates a new BaseSessionService. After creation you need to invoke 41 // Creates a new BaseSessionService. After creation you need to invoke
40 // Init. 42 // Init.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // over the commands. 183 // over the commands.
182 bool pending_reset_; 184 bool pending_reset_;
183 185
184 // The number of commands sent to the backend before doing a reset. 186 // The number of commands sent to the backend before doing a reset.
185 int commands_since_reset_; 187 int commands_since_reset_;
186 188
187 DISALLOW_COPY_AND_ASSIGN(BaseSessionService); 189 DISALLOW_COPY_AND_ASSIGN(BaseSessionService);
188 }; 190 };
189 191
190 #endif // CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_ 192 #endif // CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698