| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "chrome/browser/jumplist_win.h" | 5 #include "chrome/browser/jumplist_win.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // This update request is applied into the JumpList when we commit this | 162 // This update request is applied into the JumpList when we commit this |
| 163 // transaction. | 163 // transaction. |
| 164 if (!jumplist_updater.AddCustomCategory( | 164 if (!jumplist_updater.AddCustomCategory( |
| 165 l10n_util::GetStringUTF16(IDS_NEW_TAB_MOST_VISITED), | 165 l10n_util::GetStringUTF16(IDS_NEW_TAB_MOST_VISITED), |
| 166 most_visited_pages, most_visited_items)) { | 166 most_visited_pages, most_visited_items)) { |
| 167 return false; | 167 return false; |
| 168 } | 168 } |
| 169 | 169 |
| 170 // Update the "Recently Closed" category of the JumpList. | 170 // Update the "Recently Closed" category of the JumpList. |
| 171 if (!jumplist_updater.AddCustomCategory( | 171 if (!jumplist_updater.AddCustomCategory( |
| 172 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED), | 172 l10n_util::GetStringUTF16(IDS_RECENTLY_CLOSED), |
| 173 recently_closed_pages, recently_closed_items)) { | 173 recently_closed_pages, recently_closed_items)) { |
| 174 return false; | 174 return false; |
| 175 } | 175 } |
| 176 | 176 |
| 177 // Update the "Tasks" category of the JumpList. | 177 // Update the "Tasks" category of the JumpList. |
| 178 if (!UpdateTaskCategory(&jumplist_updater, incognito_availability)) | 178 if (!UpdateTaskCategory(&jumplist_updater, incognito_availability)) |
| 179 return false; | 179 return false; |
| 180 | 180 |
| 181 // Commit this transaction and send the updated JumpList to Windows. | 181 // Commit this transaction and send the updated JumpList to Windows. |
| 182 if (!jumplist_updater.CommitUpdate()) | 182 if (!jumplist_updater.CommitUpdate()) |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 505 |
| 506 void JumpList::TopSitesLoaded(history::TopSites* top_sites) { | 506 void JumpList::TopSitesLoaded(history::TopSites* top_sites) { |
| 507 } | 507 } |
| 508 | 508 |
| 509 void JumpList::TopSitesChanged(history::TopSites* top_sites) { | 509 void JumpList::TopSitesChanged(history::TopSites* top_sites) { |
| 510 top_sites->GetMostVisitedURLs( | 510 top_sites->GetMostVisitedURLs( |
| 511 base::Bind(&JumpList::OnMostVisitedURLsAvailable, | 511 base::Bind(&JumpList::OnMostVisitedURLsAvailable, |
| 512 weak_ptr_factory_.GetWeakPtr()), | 512 weak_ptr_factory_.GetWeakPtr()), |
| 513 false); | 513 false); |
| 514 } | 514 } |
| OLD | NEW |