Chromium Code Reviews| Index: ios/shared/chrome/browser/ui/browser_list/browser_list_session_service.h |
| diff --git a/ios/shared/chrome/browser/ui/browser_list/browser_list_session_service.h b/ios/shared/chrome/browser/ui/browser_list/browser_list_session_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3d57fe98988447291b82b70f5bf0db597eec8500 |
| --- /dev/null |
| +++ b/ios/shared/chrome/browser/ui/browser_list/browser_list_session_service.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef IOS_SHARED_CHROME_BROWSER_UI_BROWSER_LIST_BROWSER_LIST_SESSION_SERVICE_H_ |
| +#define IOS_SHARED_CHROME_BROWSER_UI_BROWSER_LIST_BROWSER_LIST_SESSION_SERVICE_H_ |
| + |
| +#include "base/macros.h" |
| +#include "components/keyed_service/core/keyed_service.h" |
| + |
| +// BrowserListSessionService allow saving and restoring saved sessions. |
| +class BrowserListSessionService : public KeyedService { |
| + public: |
| + BrowserListSessionService() = default; |
| + ~BrowserListSessionService() override = default; |
| + |
| + // Restores the saved session on the current thread. Returns whether the |
| + // load was successful or not. |
| + virtual bool RestoreSession() = 0; |
| + |
| + // Schedules deletion of the file containing the last session. |
| + virtual void ScheduleLastSessionDeletion() = 0; |
| + |
| + // Schedules recording the session on a background thread. If |immediately| |
| + // is false, then the session is recorded after a delay. In all case, if a |
| + // session recording is scheduled with a delay, it is cancelled. |
|
rohitrao (ping after 24h)
2017/05/15 11:56:03
Would it be accurate to switch to this wording? "I
sdefresne
2017/05/15 13:57:36
Done.
|
| + virtual void ScheduleSaveSession(bool immediately) = 0; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(BrowserListSessionService); |
| +}; |
| + |
| +#endif // IOS_SHARED_CHROME_BROWSER_UI_BROWSER_LIST_BROWSER_LIST_SESSION_SERVICE_H_ |