| 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 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 GURL* new_url); | 427 GURL* new_url); |
| 428 | 428 |
| 429 // Load the favicon for the tab specified by |tab_link|. Will cancel any | 429 // Load the favicon for the tab specified by |tab_link|. Will cancel any |
| 430 // outstanding request for this tab. OnFaviconDataAvailable(..) will be called | 430 // outstanding request for this tab. OnFaviconDataAvailable(..) will be called |
| 431 // when the load completes. | 431 // when the load completes. |
| 432 void LoadFaviconForTab(TabLink* tab_link); | 432 void LoadFaviconForTab(TabLink* tab_link); |
| 433 | 433 |
| 434 // Callback method to store a tab's favicon into its sync node once it becomes | 434 // Callback method to store a tab's favicon into its sync node once it becomes |
| 435 // available. Does nothing if no favicon data was available. | 435 // available. Does nothing if no favicon data was available. |
| 436 void OnFaviconDataAvailable(FaviconService::Handle handle, | 436 void OnFaviconDataAvailable(FaviconService::Handle handle, |
| 437 history::FaviconData favicon); | 437 history::FaviconData favicon_data, |
| 438 std::vector<GURL> icon_urls_in_db); |
| 438 | 439 |
| 439 // Used to populate a session header from the session specifics header | 440 // Used to populate a session header from the session specifics header |
| 440 // provided. | 441 // provided. |
| 441 static void PopulateSessionHeaderFromSpecifics( | 442 static void PopulateSessionHeaderFromSpecifics( |
| 442 const sync_pb::SessionHeader& header_specifics, | 443 const sync_pb::SessionHeader& header_specifics, |
| 443 const base::Time& mtime, | 444 const base::Time& mtime, |
| 444 SyncedSession* session_header); | 445 SyncedSession* session_header); |
| 445 | 446 |
| 446 // Used to populate a session window from the session specifics window | 447 // Used to populate a session window from the session specifics window |
| 447 // provided. Tracks any foreign session data created through |tracker|. | 448 // provided. Tracks any foreign session data created through |tracker|. |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 std::map<std::string, linked_ptr<SyncedFaviconInfo> > synced_favicons_; | 559 std::map<std::string, linked_ptr<SyncedFaviconInfo> > synced_favicons_; |
| 559 // Map of page URL -> favicon url. | 560 // Map of page URL -> favicon url. |
| 560 std::map<std::string, std::string> synced_favicon_pages_; | 561 std::map<std::string, std::string> synced_favicon_pages_; |
| 561 | 562 |
| 562 DISALLOW_COPY_AND_ASSIGN(SessionModelAssociator); | 563 DISALLOW_COPY_AND_ASSIGN(SessionModelAssociator); |
| 563 }; | 564 }; |
| 564 | 565 |
| 565 } // namespace browser_sync | 566 } // namespace browser_sync |
| 566 | 567 |
| 567 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ | 568 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ |
| OLD | NEW |