Fixed a couple of failing debug checks when calling Chromium APIs
This commit is contained in:
parent
7574c33ef1
commit
73e3fd01eb
2 changed files with 6 additions and 7 deletions
|
@ -61,11 +61,11 @@ bool GetProtocolLaunchPath(mate::Arguments* args, base::string16* exe) {
|
||||||
// Read in optional args arg
|
// Read in optional args arg
|
||||||
std::vector<base::string16> launch_args;
|
std::vector<base::string16> launch_args;
|
||||||
if (args->GetNext(&launch_args) && !launch_args.empty())
|
if (args->GetNext(&launch_args) && !launch_args.empty())
|
||||||
*exe = base::StringPrintf(L"\"%s\" %s \"%%1\"",
|
*exe = base::StringPrintf(L"\"%ls\" %ls \"%%1\"",
|
||||||
exe->c_str(),
|
exe->c_str(),
|
||||||
base::JoinString(launch_args, L" ").c_str());
|
base::JoinString(launch_args, L" ").c_str());
|
||||||
else
|
else
|
||||||
*exe = base::StringPrintf(L"\"%s\" \"%%1\"", exe->c_str());
|
*exe = base::StringPrintf(L"\"%ls\" \"%%1\"", exe->c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,8 +76,7 @@ bool FormatCommandLineString(base::string16* exe,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!launch_args.empty()) {
|
if (!launch_args.empty()) {
|
||||||
base::string16 formatString = L"%s %s";
|
*exe = base::StringPrintf(L"%ls %ls",
|
||||||
*exe = base::StringPrintf(formatString.c_str(),
|
|
||||||
exe->c_str(),
|
exe->c_str(),
|
||||||
base::JoinString(launch_args, L" ").c_str());
|
base::JoinString(launch_args, L" ").c_str());
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@ SubmenuButton::SubmenuButton(const base::string16& title,
|
||||||
menu_button_listener, false),
|
menu_button_listener, false),
|
||||||
accelerator_(0),
|
accelerator_(0),
|
||||||
show_underline_(false),
|
show_underline_(false),
|
||||||
underline_start_(-1),
|
underline_start_(0),
|
||||||
underline_end_(-1),
|
underline_end_(0),
|
||||||
text_width_(0),
|
text_width_(0),
|
||||||
text_height_(0),
|
text_height_(0),
|
||||||
underline_color_(SK_ColorBLACK),
|
underline_color_(SK_ColorBLACK),
|
||||||
|
@ -106,7 +106,7 @@ bool SubmenuButton::GetUnderlinePosition(const base::string16& text,
|
||||||
|
|
||||||
void SubmenuButton::GetCharacterPosition(
|
void SubmenuButton::GetCharacterPosition(
|
||||||
const base::string16& text, int index, int* pos) {
|
const base::string16& text, int index, int* pos) {
|
||||||
int height;
|
int height = 0;
|
||||||
gfx::Canvas::SizeStringInt(text.substr(0, index), GetFontList(), pos, &height,
|
gfx::Canvas::SizeStringInt(text.substr(0, index), GetFontList(), pos, &height,
|
||||||
0, 0);
|
0, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue