ExtensionSyncService: Properly differentiate between "pending install" and "pending...
[chromium-blink-merge.git] / components / sessions / base_session_service_test_helper.cc
blob2cdcbb06d1b66a3e800aacaba4595ae3521f55b3
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 #include "components/sessions/base_session_service_test_helper.h"
7 #include "components/sessions/base_session_service.h"
8 #include "components/sessions/session_backend.h"
10 namespace sessions {
12 BaseSessionServiceTestHelper::BaseSessionServiceTestHelper(
13 BaseSessionService* base_session_service)
14 : base_session_service_(base_session_service) {
15 CHECK(base_session_service);
18 BaseSessionServiceTestHelper::~BaseSessionServiceTestHelper() {
21 void BaseSessionServiceTestHelper::RunTaskOnBackendThread(
22 const tracked_objects::Location& from_here,
23 const base::Closure& task) {
24 base_session_service_->RunTaskOnBackendThread(from_here, task);
27 bool BaseSessionServiceTestHelper::ProcessedAnyCommands() {
28 return base_session_service_->backend_->inited() ||
29 !base_session_service_->pending_commands().empty();
32 bool BaseSessionServiceTestHelper::ReadLastSessionCommands(
33 ScopedVector<SessionCommand>* commands) {
34 return base_session_service_->backend_->ReadLastSessionCommandsImpl(commands);
37 } // namespace sessions