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

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

Issue 672083002: Refactoring of SessionService to get componentized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more self nit 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_H_
6 #define CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_H_ 6 #define CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 9
10 namespace base { 10 namespace base {
11 class SequencedWorkerPool; 11 class SequencedWorkerPool;
12 } 12 }
13 13
14 class GURL; 14 class GURL;
15 15
16 // The BaseSessionServiceDelegate decouples the BaseSessionService from 16 // The BaseSessionServiceDelegate decouples the BaseSessionService from
17 // chrome/content dependencies. 17 // chrome/content dependencies.
18 class BaseSessionServiceDelegate { 18 class BaseSessionServiceDelegate {
19 public: 19 public:
20 BaseSessionServiceDelegate() {} 20 BaseSessionServiceDelegate() {}
21 virtual ~BaseSessionServiceDelegate() {}
22 21
23 // Get the sequenced worker pool for running tasks on the backend thread as 22 // Get the sequenced worker pool for running tasks on the backend thread as
24 // long as the system is not shutting down. 23 // long as the system is not shutting down.
25 virtual base::SequencedWorkerPool* GetBlockingPool() = 0; 24 virtual base::SequencedWorkerPool* GetBlockingPool() = 0;
26 25
27 // Tests if a given URL should be tracked. 26 // Tests if a given URL should be tracked.
28 virtual bool ShouldTrackEntry(const GURL& url) = 0; 27 virtual bool ShouldTrackEntry(const GURL& url) = 0;
29 28
30 // Returns true if save operations can be performed as a delayed task - which 29 // Returns true if save operations can be performed as a delayed task - which
31 // is usually only used by unit tests. 30 // is usually only used by unit tests.
32 virtual bool ShouldUseDelayedSave() = 0; 31 virtual bool ShouldUseDelayedSave() = 0;
32
33 // Called when commands are about to be written to disc.
34 virtual void OnWillSaveCommands() = 0;
35
36 // Called when commands were saved to disc.
37 virtual void OnSavedCommands() = 0;
38
39 protected:
40 virtual ~BaseSessionServiceDelegate() {}
33 }; 41 };
34 42
35 #endif // CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_H_ 43 #endif // CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698