Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(426)

Side by Side Diff: chrome/browser/jumplist_win.cc

Issue 879783004: Cleanup: Don't bother doing no-op wide/utf16 conversions on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/version_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 profiles_or_most_visited_items += 178 profiles_or_most_visited_items +=
179 recently_closed_items - recently_closed_pages.size(); 179 recently_closed_items - recently_closed_pages.size();
180 recently_closed_items = recently_closed_pages.size(); 180 recently_closed_items = recently_closed_pages.size();
181 } 181 }
182 } 182 }
183 183
184 // Update the "Most Visited" category of the JumpList if it exists. 184 // Update the "Most Visited" category of the JumpList if it exists.
185 // This update request is applied into the JumpList when we commit this 185 // This update request is applied into the JumpList when we commit this
186 // transaction. 186 // transaction.
187 if (!use_profiles_category && !jumplist_updater.AddCustomCategory( 187 if (!use_profiles_category && !jumplist_updater.AddCustomCategory(
188 base::UTF16ToWide( 188 l10n_util::GetStringUTF16(IDS_NEW_TAB_MOST_VISITED),
189 l10n_util::GetStringUTF16(IDS_NEW_TAB_MOST_VISITED)),
190 most_visited_pages, profiles_or_most_visited_items)) { 189 most_visited_pages, profiles_or_most_visited_items)) {
191 return false; 190 return false;
192 } 191 }
193 192
194 // Update the "Recently Closed" category of the JumpList. 193 // Update the "Recently Closed" category of the JumpList.
195 if (!jumplist_updater.AddCustomCategory( 194 if (!jumplist_updater.AddCustomCategory(
196 base::UTF16ToWide( 195 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED),
197 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED)),
198 recently_closed_pages, recently_closed_items)) { 196 recently_closed_pages, recently_closed_items)) {
199 return false; 197 return false;
200 } 198 }
201 199
202 // Update the "People" category of the JumpList if it exists. Only display it 200 // Update the "People" category of the JumpList if it exists. Only display it
203 // if there's more than one profile available. 201 // if there's more than one profile available.
204 if (use_profiles_category && profile_switcher.size() > 1 && 202 if (use_profiles_category && profile_switcher.size() > 1 &&
205 !jumplist_updater.AddCustomCategory( 203 !jumplist_updater.AddCustomCategory(
206 l10n_util::GetStringUTF16(IDS_PROFILES_OPTIONS_GROUP_NAME), 204 l10n_util::GetStringUTF16(IDS_PROFILES_OPTIONS_GROUP_NAME),
207 profile_switcher, profiles_or_most_visited_items)) { 205 profile_switcher, profiles_or_most_visited_items)) {
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 602
605 void JumpList::TopSitesLoaded(history::TopSites* top_sites) { 603 void JumpList::TopSitesLoaded(history::TopSites* top_sites) {
606 } 604 }
607 605
608 void JumpList::TopSitesChanged(history::TopSites* top_sites) { 606 void JumpList::TopSitesChanged(history::TopSites* top_sites) {
609 top_sites->GetMostVisitedURLs( 607 top_sites->GetMostVisitedURLs(
610 base::Bind(&JumpList::OnMostVisitedURLsAvailable, 608 base::Bind(&JumpList::OnMostVisitedURLsAvailable,
611 weak_ptr_factory_.GetWeakPtr()), 609 weak_ptr_factory_.GetWeakPtr()),
612 false); 610 false);
613 } 611 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/version_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698