OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/sessions/session_service_test_helper.h" | 5 #include "chrome/browser/sessions/session_service_test_helper.h" |
6 | 6 |
7 #include "base/memory/scoped_vector.h" | 7 #include "base/memory/scoped_vector.h" |
| 8 #include "base/message_loop/message_loop.h" |
8 #include "chrome/browser/sessions/session_backend.h" | 9 #include "chrome/browser/sessions/session_backend.h" |
9 #include "chrome/browser/sessions/session_service.h" | 10 #include "chrome/browser/sessions/session_service.h" |
10 #include "chrome/browser/sessions/session_types.h" | 11 #include "chrome/browser/sessions/session_types.h" |
11 #include "components/sessions/serialized_navigation_entry_test_helper.h" | 12 #include "components/sessions/serialized_navigation_entry_test_helper.h" |
12 #include "components/sessions/session_id.h" | 13 #include "components/sessions/session_id.h" |
13 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 | 16 |
16 using base::Time; | 17 using base::Time; |
17 | 18 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 SessionBackend* SessionServiceTestHelper::backend() { | 105 SessionBackend* SessionServiceTestHelper::backend() { |
105 return service_->backend(); | 106 return service_->backend(); |
106 } | 107 } |
107 | 108 |
108 void SessionServiceTestHelper::SetService(SessionService* service) { | 109 void SessionServiceTestHelper::SetService(SessionService* service) { |
109 service_.reset(service); | 110 service_.reset(service); |
110 // Execute IO tasks posted by the SessionService. | 111 // Execute IO tasks posted by the SessionService. |
111 content::BrowserThread::GetBlockingPool()->FlushForTesting(); | 112 content::BrowserThread::GetBlockingPool()->FlushForTesting(); |
112 } | 113 } |
113 | 114 |
| 115 void SessionServiceTestHelper::RunTaskOnBackendThread( |
| 116 const tracked_objects::Location& from_here, |
| 117 const base::Closure& task) { |
| 118 service_->RunTaskOnBackendThread(from_here, task); |
| 119 } |
OLD | NEW |