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

Side by Side Diff: components/sessions/base_session_service_delegate.h

Issue 1331173002: Eliminate BaseSessionServiceDelegateImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@persistent_tab_restore_service_client
Patch Set: Response to reviewv Created 5 years, 3 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
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | components/sessions/core/tab_restore_service_client.h » ('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 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 COMPONENTS_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_H_ 5 #ifndef COMPONENTS_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_H_
6 #define COMPONENTS_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_H_ 6 #define COMPONENTS_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;
15
16 namespace sessions { 14 namespace sessions {
17 15
18 // The BaseSessionServiceDelegate decouples the BaseSessionService from 16 // The BaseSessionServiceDelegate decouples the BaseSessionService from
19 // chrome/content dependencies. 17 // chrome/content dependencies.
20 class BaseSessionServiceDelegate { 18 class BaseSessionServiceDelegate {
21 public: 19 public:
22 BaseSessionServiceDelegate() {} 20 BaseSessionServiceDelegate() {}
23 21
24 // 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
25 // long as the system is not shutting down. 23 // long as the system is not shutting down.
26 virtual base::SequencedWorkerPool* GetBlockingPool() = 0; 24 virtual base::SequencedWorkerPool* GetBlockingPool() = 0;
27 25
28 // Tests if a given URL should be tracked.
29 virtual bool ShouldTrackEntry(const GURL& url) = 0;
30
31 // Returns true if save operations can be performed as a delayed task - which 26 // Returns true if save operations can be performed as a delayed task - which
32 // is usually only used by unit tests. 27 // is usually only used by unit tests.
33 virtual bool ShouldUseDelayedSave() = 0; 28 virtual bool ShouldUseDelayedSave() = 0;
34 29
35 // Called when commands are about to be written to disc. 30 // Called when commands are about to be written to disc.
36 virtual void OnWillSaveCommands() = 0; 31 virtual void OnWillSaveCommands() {}
37 32
38 // Called when commands were saved to disc. 33 // Called when commands were saved to disc.
39 virtual void OnSavedCommands() = 0; 34 virtual void OnSavedCommands() {}
40 35
41 protected: 36 protected:
42 virtual ~BaseSessionServiceDelegate() {} 37 virtual ~BaseSessionServiceDelegate() {}
43 }; 38 };
44 39
45 } // namespace sessions 40 } // namespace sessions
46 41
47 #endif // COMPONENTS_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_H_ 42 #endif // COMPONENTS_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | components/sessions/core/tab_restore_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698