| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_IMPL_H_ | |
| 6 #define CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_IMPL_H_ | |
| 7 | |
| 8 #include "components/sessions/base_session_service_delegate.h" | |
| 9 | |
| 10 class BaseSessionServiceDelegateImpl | |
| 11 : public sessions::BaseSessionServiceDelegate { | |
| 12 public: | |
| 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 | |
| 15 // supply false. | |
| 16 explicit BaseSessionServiceDelegateImpl(bool should_use_delayed_save); | |
| 17 ~BaseSessionServiceDelegateImpl() override {} | |
| 18 | |
| 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 {} | |
| 25 | |
| 26 private: | |
| 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_; | |
| 30 | |
| 31 DISALLOW_COPY_AND_ASSIGN(BaseSessionServiceDelegateImpl); | |
| 32 }; | |
| 33 | |
| 34 #endif // CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_DELEGATE_IMPL_H_ | |
| OLD | NEW |