win: Fix crash when calling app.setName

This commit is contained in:
Cheng Zhao 2014-11-21 16:38:54 +08:00
parent 8a73d91ea1
commit 8951572366

View file

@ -118,8 +118,8 @@ void Browser::SetUserTasks(const std::vector<UserTask>& tasks) {
}
void Browser::SetAppUserModelID(const std::string& name) {
app_user_model_id_ = base::UTF8ToUTF16(
base::StringPrintf("atom-shell.app.%s", name));
app_user_model_id_ = base::string16(L"atom-shell.app.");
app_user_model_id_ += base::UTF8ToUTF16(name);
SetCurrentProcessExplicitAppUserModelID(app_user_model_id_.c_str());
}