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 "chrome/browser/sessions/session_backend.h" | 8 #include "chrome/browser/sessions/session_backend.h" |
9 #include "chrome/browser/sessions/session_id.h" | |
10 #include "chrome/browser/sessions/session_service.h" | 9 #include "chrome/browser/sessions/session_service.h" |
11 #include "chrome/browser/sessions/session_types.h" | 10 #include "chrome/browser/sessions/session_types.h" |
12 #include "components/sessions/serialized_navigation_entry_test_helper.h" | 11 #include "components/sessions/serialized_navigation_entry_test_helper.h" |
| 12 #include "components/sessions/session_id.h" |
13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 using base::Time; | 16 using base::Time; |
17 | 17 |
18 SessionServiceTestHelper::SessionServiceTestHelper() {} | 18 SessionServiceTestHelper::SessionServiceTestHelper() {} |
19 | 19 |
20 SessionServiceTestHelper::SessionServiceTestHelper(SessionService* service) | 20 SessionServiceTestHelper::SessionServiceTestHelper(SessionService* service) |
21 : service_(service) {} | 21 : service_(service) {} |
22 | 22 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 SessionBackend* SessionServiceTestHelper::backend() { | 104 SessionBackend* SessionServiceTestHelper::backend() { |
105 return service_->backend(); | 105 return service_->backend(); |
106 } | 106 } |
107 | 107 |
108 void SessionServiceTestHelper::SetService(SessionService* service) { | 108 void SessionServiceTestHelper::SetService(SessionService* service) { |
109 service_.reset(service); | 109 service_.reset(service); |
110 // Execute IO tasks posted by the SessionService. | 110 // Execute IO tasks posted by the SessionService. |
111 content::BrowserThread::GetBlockingPool()->FlushForTesting(); | 111 content::BrowserThread::GetBlockingPool()->FlushForTesting(); |
112 } | 112 } |
113 | 113 |
OLD | NEW |