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 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSIONS_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSIONS_HELPER_H_ |
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSIONS_HELPER_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSIONS_HELPER_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "chrome/browser/sync/test/integration/multi_client_status_change_checke
r.h" | 15 #include "chrome/browser/sync/test/integration/multi_client_status_change_checke
r.h" |
16 #include "chrome/browser/sync/test/integration/sync_test.h" | 16 #include "chrome/browser/sync/test/integration/sync_test.h" |
17 #include "components/sessions/core/session_types.h" | 17 #include "components/sessions/core/session_types.h" |
18 #include "components/sync/syncable/nigori_util.h" | 18 #include "components/sync/syncable/nigori_util.h" |
19 #include "components/sync_sessions/synced_session.h" | 19 #include "components/sync_sessions/synced_session.h" |
20 | 20 |
21 class GURL; | 21 class GURL; |
22 | 22 |
23 namespace sessions_helper { | 23 namespace sessions_helper { |
24 | 24 |
25 using SyncedSessionVector = std::vector<const sync_sessions::SyncedSession*>; | 25 using SyncedSessionVector = std::vector<const sync_sessions::SyncedSession*>; |
26 using SessionWindowMap = std::map<SessionID::id_type, sessions::SessionWindow*>; | 26 using SessionWindowMap = |
| 27 std::map<SessionID::id_type, sync_sessions::SyncedSessionWindow*>; |
27 using ScopedWindowMap = | 28 using ScopedWindowMap = |
28 std::map<SessionID::id_type, std::unique_ptr<sessions::SessionWindow>>; | 29 std::map<SessionID::id_type, |
| 30 std::unique_ptr<sync_sessions::SyncedSessionWindow>>; |
29 | 31 |
30 // Copies the local session windows of profile at |index| to |local_windows|. | 32 // Copies the local session windows of profile at |index| to |local_windows|. |
31 // Returns true if successful. | 33 // Returns true if successful. |
32 bool GetLocalWindows(int index, ScopedWindowMap* local_windows); | 34 bool GetLocalWindows(int index, ScopedWindowMap* local_windows); |
33 | 35 |
34 // Checks that window count and foreign session count are 0. | 36 // Checks that window count and foreign session count are 0. |
35 bool CheckInitialState(int index); | 37 bool CheckInitialState(int index); |
36 | 38 |
37 // Returns number of open windows for a profile. | 39 // Returns number of open windows for a profile. |
38 int GetNumWindows(int index); | 40 int GetNumWindows(int index); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // StatusChangeChecker implementation. | 158 // StatusChangeChecker implementation. |
157 bool IsExitConditionSatisfied() override; | 159 bool IsExitConditionSatisfied() override; |
158 std::string GetDebugMessage() const override; | 160 std::string GetDebugMessage() const override; |
159 | 161 |
160 private: | 162 private: |
161 int index_; | 163 int index_; |
162 const std::vector<sessions_helper::ScopedWindowMap>& windows_; | 164 const std::vector<sessions_helper::ScopedWindowMap>& windows_; |
163 }; | 165 }; |
164 | 166 |
165 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSIONS_HELPER_H_ | 167 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSIONS_HELPER_H_ |
OLD | NEW |