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

Unified Diff: chrome/browser/sessions/session_service.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sessions/session_common_utils.cc ('k') | chrome/browser/sessions/session_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_service.h
diff --git a/chrome/browser/sessions/session_service.h b/chrome/browser/sessions/session_service.h
index 0b93d26a098e0345b6a44f4480a6094c277a0cc8..98ee0b579173f7eb5923730039d2928b90882184 100644
--- a/chrome/browser/sessions/session_service.h
+++ b/chrome/browser/sessions/session_service.h
@@ -15,12 +15,13 @@
#include "base/task/cancelable_task_tracker.h"
#include "base/time/time.h"
#include "chrome/browser/defaults.h"
-#include "chrome/browser/sessions/base_session_service_delegate_impl.h"
+#include "chrome/browser/sessions/session_common_utils.h"
#include "chrome/browser/sessions/session_service_utils.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "components/keyed_service/core/keyed_service.h"
+#include "components/sessions/base_session_service_delegate.h"
#include "components/sessions/core/tab_restore_service_client.h"
#include "components/sessions/session_service_commands.h"
#include "content/public/browser/notification_observer.h"
@@ -60,7 +61,7 @@ struct SessionWindow;
// flushed to |SessionBackend| and written to a file. Every so often
// |SessionService| rebuilds the contents of the file from the open state of the
// browser.
-class SessionService : public BaseSessionServiceDelegateImpl,
+class SessionService : public sessions::BaseSessionServiceDelegate,
public KeyedService,
public content::NotificationObserver,
public chrome::BrowserListObserver {
@@ -214,7 +215,9 @@ class SessionService : public BaseSessionServiceDelegateImpl,
const sessions::GetLastSessionCallback& callback,
base::CancelableTaskTracker* tracker);
- // BaseSessionServiceDelegateImpl:
+ // sessions::BaseSessionServiceDelegate:
+ base::SequencedWorkerPool* GetBlockingPool() override;
+ bool ShouldUseDelayedSave() override;
void OnSavedCommands() override;
private:
@@ -335,6 +338,10 @@ class SessionService : public BaseSessionServiceDelegateImpl,
// The profile. This may be null during testing.
Profile* profile_;
+ // Whether to use delayed save. Set to false when constructed with a FilePath
+ // (which should only be used for testing).
+ bool should_use_delayed_save_;
+
// The owned BaseSessionService.
scoped_ptr<sessions::BaseSessionService> base_session_service_;
« no previous file with comments | « chrome/browser/sessions/session_common_utils.cc ('k') | chrome/browser/sessions/session_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698