| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "chrome/browser/sessions/session_restore_delegate.h" | 5 #include "chrome/browser/sessions/session_restore_delegate.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 void SessionRestoreDelegate::RestoreTabs( | 69 void SessionRestoreDelegate::RestoreTabs( |
| 70 const std::vector<RestoredTab>& tabs, | 70 const std::vector<RestoredTab>& tabs, |
| 71 const base::TimeTicks& restore_started) { | 71 const base::TimeTicks& restore_started) { |
| 72 // Restore the favicon for all tabs. Any tab may end up being deferred due | 72 // Restore the favicon for all tabs. Any tab may end up being deferred due |
| 73 // to memory pressure so it's best to have some visual indication of its | 73 // to memory pressure so it's best to have some visual indication of its |
| 74 // contents. | 74 // contents. |
| 75 for (const auto& restored_tab : tabs) { | 75 for (const auto& restored_tab : tabs) { |
| 76 // Restore the favicon for deferred tabs. | 76 // Restore the favicon for deferred tabs. |
| 77 favicon::ContentFaviconDriver* favicon_driver = | 77 favicon::ContentFaviconDriver* favicon_driver = |
| 78 favicon::ContentFaviconDriver::FromWebContents(restored_tab.contents()); | 78 favicon::ContentFaviconDriver::FromWebContents(restored_tab.contents()); |
| 79 // TODO(mastiz): This seems broken: one call cancels previous ones so this |
| 80 // is unlikely to do any good. |
| 79 favicon_driver->FetchFavicon(favicon_driver->GetActiveURL()); | 81 favicon_driver->FetchFavicon(favicon_driver->GetActiveURL()); |
| 80 } | 82 } |
| 81 | 83 |
| 82 TabLoader::RestoreTabs(tabs, restore_started); | 84 TabLoader::RestoreTabs(tabs, restore_started); |
| 83 } | 85 } |
| OLD | NEW |