| 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_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 // Returns the syncable model type. | 195 // Returns the syncable model type. |
| 196 static syncable::ModelType model_type() { return syncable::SESSIONS; } | 196 static syncable::ModelType model_type() { return syncable::SESSIONS; } |
| 197 | 197 |
| 198 // Testing only. Will cause the associator to call MessageLoop::Quit() | 198 // Testing only. Will cause the associator to call MessageLoop::Quit() |
| 199 // when a local change is made, or when timeout_milli occurs, whichever is | 199 // when a local change is made, or when timeout_milli occurs, whichever is |
| 200 // first. | 200 // first. |
| 201 void BlockUntilLocalChangeForTest(int64 timeout_milli); | 201 void BlockUntilLocalChangeForTest(int64 timeout_milli); |
| 202 | 202 |
| 203 // Callback for when the session name has been computed. | 203 // Callback for when the session name has been computed. |
| 204 void OnSessionNameInitialized(const std::string& name); | 204 void OnSessionNameInitialized(const std::string name); |
| 205 | 205 |
| 206 private: | 206 private: |
| 207 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, WriteSessionToNode); | 207 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, WriteSessionToNode); |
| 208 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, | 208 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, |
| 209 WriteFilledSessionToNode); | 209 WriteFilledSessionToNode); |
| 210 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, | 210 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, |
| 211 WriteForeignSessionToNode); | 211 WriteForeignSessionToNode); |
| 212 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, TabNodePoolEmpty); | 212 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, TabNodePoolEmpty); |
| 213 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, TabNodePoolNonEmpty); | 213 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, TabNodePoolNonEmpty); |
| 214 FRIEND_TEST_ALL_PREFIXES(SessionModelAssociatorTest, PopulateSessionHeader); | 214 FRIEND_TEST_ALL_PREFIXES(SessionModelAssociatorTest, PopulateSessionHeader); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 // is made. | 466 // is made. |
| 467 bool waiting_for_change_; | 467 bool waiting_for_change_; |
| 468 ScopedRunnableMethodFactory<SessionModelAssociator> test_method_factory_; | 468 ScopedRunnableMethodFactory<SessionModelAssociator> test_method_factory_; |
| 469 | 469 |
| 470 DISALLOW_COPY_AND_ASSIGN(SessionModelAssociator); | 470 DISALLOW_COPY_AND_ASSIGN(SessionModelAssociator); |
| 471 }; | 471 }; |
| 472 | 472 |
| 473 } // namespace browser_sync | 473 } // namespace browser_sync |
| 474 | 474 |
| 475 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ | 475 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ |
| OLD | NEW |