OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_TEST_LIVE_SYNC_LIVE_SESSIONS_SYNC_TEST_H_ | 5 #ifndef CHROME_TEST_LIVE_SYNC_LIVE_SESSIONS_SYNC_TEST_H_ |
6 #define CHROME_TEST_LIVE_SYNC_LIVE_SESSIONS_SYNC_TEST_H_ | 6 #define CHROME_TEST_LIVE_SYNC_LIVE_SESSIONS_SYNC_TEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <vector> | 10 #include <vector> |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 protected: | 109 protected: |
110 // Open a single tab and block until the session model associator is aware | 110 // Open a single tab and block until the session model associator is aware |
111 // of it. Returns true upon success, false otherwise. | 111 // of it. Returns true upon success, false otherwise. |
112 bool OpenTab(int index, const GURL& url) WARN_UNUSED_RESULT; | 112 bool OpenTab(int index, const GURL& url) WARN_UNUSED_RESULT; |
113 | 113 |
114 // Check if the session model associator's knows that the current open tab | 114 // Check if the session model associator's knows that the current open tab |
115 // has this url. | 115 // has this url. |
116 bool ModelAssociatorHasTabWithUrl(int index, const GURL& url); | 116 bool ModelAssociatorHasTabWithUrl(int index, const GURL& url); |
117 | 117 |
| 118 // Stores a pointer to the local session for a given profile in |session|. |
| 119 // Returns true on success, false on failure. |
| 120 bool GetLocalSession(int index, const SyncedSession** session); |
| 121 |
118 // Clean up our mess. | 122 // Clean up our mess. |
119 virtual void CleanUpOnMainThread(); | 123 virtual void CleanUpOnMainThread(); |
120 | 124 |
121 // Vector of our browsers for each profile. | 125 // Vector of our browsers for each profile. |
122 std::vector<Browser*> browsers_; | 126 std::vector<Browser*> browsers_; |
123 | 127 |
124 // Barrier for closing the browsers we create in UI thread. | 128 // Barrier for closing the browsers we create in UI thread. |
125 base::WaitableEvent done_closing_; | 129 base::WaitableEvent done_closing_; |
126 | 130 |
127 // List of all copies of local sessions we get from the model associator. We | 131 // List of all copies of local sessions we get from the model associator. We |
(...skipping 27 matching lines...) Expand all Loading... |
155 public: | 159 public: |
156 MultipleClientLiveSessionsSyncTest() | 160 MultipleClientLiveSessionsSyncTest() |
157 : LiveSessionsSyncTest(MULTIPLE_CLIENT) {} | 161 : LiveSessionsSyncTest(MULTIPLE_CLIENT) {} |
158 virtual ~MultipleClientLiveSessionsSyncTest() {} | 162 virtual ~MultipleClientLiveSessionsSyncTest() {} |
159 | 163 |
160 private: | 164 private: |
161 DISALLOW_COPY_AND_ASSIGN(MultipleClientLiveSessionsSyncTest); | 165 DISALLOW_COPY_AND_ASSIGN(MultipleClientLiveSessionsSyncTest); |
162 }; | 166 }; |
163 | 167 |
164 #endif // CHROME_TEST_LIVE_SYNC_LIVE_SESSIONS_SYNC_TEST_H_ | 168 #endif // CHROME_TEST_LIVE_SYNC_LIVE_SESSIONS_SYNC_TEST_H_ |
OLD | NEW |