| 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_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 <set> | 10 #include <set> |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // Control which local tabs we're interested in syncing. | 211 // Control which local tabs we're interested in syncing. |
| 212 // Ensures the profile matches sync's profile and that the tab has valid | 212 // Ensures the profile matches sync's profile and that the tab has valid |
| 213 // entries. | 213 // entries. |
| 214 bool ShouldSyncTab(const SyncedTabDelegate& tab) const; | 214 bool ShouldSyncTab(const SyncedTabDelegate& tab) const; |
| 215 | 215 |
| 216 // Compare |urls| against |tab_map_|'s urls to see if any tabs with | 216 // Compare |urls| against |tab_map_|'s urls to see if any tabs with |
| 217 // outstanding favicon loads can be fulfilled. | 217 // outstanding favicon loads can be fulfilled. |
| 218 void FaviconsUpdated(const std::set<GURL>& urls); | 218 void FaviconsUpdated(const std::set<GURL>& urls); |
| 219 | 219 |
| 220 // Returns the syncable model type. | 220 // Returns the syncable model type. |
| 221 static syncable::ModelType model_type() { return syncable::SESSIONS; } | 221 static syncer::ModelType model_type() { return syncer::SESSIONS; } |
| 222 | 222 |
| 223 // Testing only. Will cause the associator to call MessageLoop::Quit() | 223 // Testing only. Will cause the associator to call MessageLoop::Quit() |
| 224 // when a local change is made, or when timeout_milli occurs, whichever is | 224 // when a local change is made, or when timeout_milli occurs, whichever is |
| 225 // first. | 225 // first. |
| 226 void BlockUntilLocalChangeForTest(int64 timeout_milli); | 226 void BlockUntilLocalChangeForTest(int64 timeout_milli); |
| 227 | 227 |
| 228 // Callback for when the session name has been computed. | 228 // Callback for when the session name has been computed. |
| 229 void OnSessionNameInitialized(const std::string& name); | 229 void OnSessionNameInitialized(const std::string& name); |
| 230 | 230 |
| 231 // If a valid favicon for the page at |url| is found, fills |png_favicon| with | 231 // If a valid favicon for the page at |url| is found, fills |png_favicon| with |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 std::map<std::string, linked_ptr<SyncedFaviconInfo> > synced_favicons_; | 559 std::map<std::string, linked_ptr<SyncedFaviconInfo> > synced_favicons_; |
| 560 // Map of page URL -> favicon url. | 560 // Map of page URL -> favicon url. |
| 561 std::map<std::string, std::string> synced_favicon_pages_; | 561 std::map<std::string, std::string> synced_favicon_pages_; |
| 562 | 562 |
| 563 DISALLOW_COPY_AND_ASSIGN(SessionModelAssociator); | 563 DISALLOW_COPY_AND_ASSIGN(SessionModelAssociator); |
| 564 }; | 564 }; |
| 565 | 565 |
| 566 } // namespace browser_sync | 566 } // namespace browser_sync |
| 567 | 567 |
| 568 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ | 568 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ |
| OLD | NEW |