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

Unified Diff: chrome/browser/win/jumplist_updater.cc

Issue 2870853002: Change 4 funcs to JumpList member funcs, retire wstring for jumplist* (Closed)
Patch Set: Change base::unretained(this) to this Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/win/jumplist_updater.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/jumplist_updater.cc
diff --git a/chrome/browser/win/jumplist_updater.cc b/chrome/browser/win/jumplist_updater.cc
index c087a4c9546f4609137bacfba0099895f1b66f43..c7295291d22a868cceb92d234874e4c5d1b0386f 100644
--- a/chrome/browser/win/jumplist_updater.cc
+++ b/chrome/browser/win/jumplist_updater.cc
@@ -24,7 +24,7 @@ namespace {
// requires three items: the absolute path to an application, an argument
// string, and a title string.
bool AddShellLink(base::win::ScopedComPtr<IObjectCollection> collection,
- const std::wstring& application_path,
+ const base::string16& application_path,
scoped_refptr<ShellLinkItem> item) {
// Create an IShellLink object.
base::win::ScopedComPtr<IShellLink> link;
@@ -44,7 +44,7 @@ bool AddShellLink(base::win::ScopedComPtr<IObjectCollection> collection,
// arguments and set it as the arguments of this IShellLink object.
// We also exit this function when this call fails because it isn't useful to
// add a shortcut that cannot open the given page.
- std::wstring arguments(item->GetArguments());
+ base::string16 arguments(item->GetArguments());
if (!arguments.empty()) {
result = link->SetArguments(arguments.c_str());
if (FAILED(result))
@@ -89,7 +89,7 @@ ShellLinkItem::ShellLinkItem()
ShellLinkItem::~ShellLinkItem() {}
-std::wstring ShellLinkItem::GetArguments() const {
+base::string16 ShellLinkItem::GetArguments() const {
return command_line_.GetArgumentsString();
}
@@ -100,10 +100,8 @@ base::CommandLine* ShellLinkItem::GetCommandLine() {
// JumpListUpdater
-JumpListUpdater::JumpListUpdater(const std::wstring& app_user_model_id)
- : app_user_model_id_(app_user_model_id),
- user_max_items_(0) {
-}
+JumpListUpdater::JumpListUpdater(const base::string16& app_user_model_id)
+ : app_user_model_id_(app_user_model_id), user_max_items_(0) {}
JumpListUpdater::~JumpListUpdater() {
}
@@ -203,7 +201,7 @@ bool JumpListUpdater::AddTasks(const ShellLinkItemList& link_items) {
return SUCCEEDED(destination_list_->AddUserTasks(object_array.Get()));
}
-bool JumpListUpdater::AddCustomCategory(const std::wstring& category_name,
+bool JumpListUpdater::AddCustomCategory(const base::string16& category_name,
const ShellLinkItemList& link_items,
size_t max_items) {
// TODO(chengx): Remove the UMA histogram after fixing http://crbug.com/40407.
« no previous file with comments | « chrome/browser/win/jumplist_updater.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698