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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_IMPL_H_
6 #define CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_IMPL_H_
8 #include "components/sessions/base_session_service_delegate.h"
10 class BaseSessionServiceDelegateImpl
11 : public sessions::BaseSessionServiceDelegate
{
13 // If |use_delayed_save| is true, save operations can be performed as a
14 // delayed task. Generally |used_delayed_save| should be true, testing may
16 explicit BaseSessionServiceDelegateImpl(bool should_use_delayed_save
);
17 ~BaseSessionServiceDelegateImpl() override
{}
19 // BaseSessionServiceDelegate:
20 base::SequencedWorkerPool
* GetBlockingPool() override
;
21 bool ShouldTrackEntry(const GURL
& url
) override
;
22 bool ShouldUseDelayedSave() override
;
23 void OnWillSaveCommands() override
{}
24 void OnSavedCommands() override
{}
27 // True if save operations can be performed as a delayed task. This can be
28 // disabled for unit tests.
29 const bool should_use_delayed_save_
;
31 DISALLOW_COPY_AND_ASSIGN(BaseSessionServiceDelegateImpl
);
34 #endif // CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_IMPL_H_