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/sync/test/integration/sessions_helper.h" | 5 #include "chrome/browser/sync/test/integration/sessions_helper.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 if (base::TimeTicks::Now() >= end_time) { | 132 if (base::TimeTicks::Now() >= end_time) { |
133 LOG(ERROR) << "Failed to find all tabs after " | 133 LOG(ERROR) << "Failed to find all tabs after " |
134 << TestTimeouts::action_max_timeout().InSecondsF() | 134 << TestTimeouts::action_max_timeout().InSecondsF() |
135 << " seconds."; | 135 << " seconds."; |
136 return false; | 136 return false; |
137 } | 137 } |
138 if (!found) { | 138 if (!found) { |
139 ProfileSyncServiceFactory::GetInstance()->GetForProfile( | 139 ProfileSyncServiceFactory::GetInstance()->GetForProfile( |
140 test()->GetProfile(index))->GetSessionModelAssociator()-> | 140 test()->GetProfile(index))->GetSessionModelAssociator()-> |
141 BlockUntilLocalChangeForTest(TestTimeouts::action_max_timeout()); | 141 BlockUntilLocalChangeForTest(TestTimeouts::action_max_timeout()); |
142 ui_test_utils::RunMessageLoop(); | 142 content::RunMessageLoop(); |
143 } | 143 } |
144 } | 144 } |
145 } | 145 } |
146 return true; | 146 return true; |
147 } | 147 } |
148 | 148 |
149 bool GetLocalWindows(int index, SessionWindowMap* local_windows) { | 149 bool GetLocalWindows(int index, SessionWindowMap* local_windows) { |
150 // The local session provided by GetLocalSession is owned, and has lifetime | 150 // The local session provided by GetLocalSession is owned, and has lifetime |
151 // controlled, by the model associator, so we must make our own copy. | 151 // controlled, by the model associator, so we must make our own copy. |
152 const browser_sync::SyncedSession* local_session; | 152 const browser_sync::SyncedSession* local_session; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 return true; | 307 return true; |
308 } | 308 } |
309 | 309 |
310 void DeleteForeignSession(int index, std::string session_tag) { | 310 void DeleteForeignSession(int index, std::string session_tag) { |
311 ProfileSyncServiceFactory::GetInstance()->GetForProfile( | 311 ProfileSyncServiceFactory::GetInstance()->GetForProfile( |
312 test()->GetProfile(index))-> | 312 test()->GetProfile(index))-> |
313 GetSessionModelAssociator()->DeleteForeignSession(session_tag); | 313 GetSessionModelAssociator()->DeleteForeignSession(session_tag); |
314 } | 314 } |
315 | 315 |
316 } // namespace sessions_helper | 316 } // namespace sessions_helper |
OLD | NEW |