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

Side by Side Diff: remoting/host/disconnect_window_win.cc

Issue 121123002: Update uses of UTF conversions in ppapi/, printing/, remoting/, rlz/, sandbox/, skia/, sql/, sync/,… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/disconnect_window_mac.mm ('k') | remoting/host/host_event_logger_win.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <windows.h> 5 #include <windows.h>
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/process/memory.h" 9 #include "base/process/memory.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 return false; 309 return false;
310 310
311 base::string16 button_text; 311 base::string16 button_text;
312 base::string16 message_text; 312 base::string16 message_text;
313 if (!GetControlText(hwnd_button, &button_text) || 313 if (!GetControlText(hwnd_button, &button_text) ||
314 !GetControlText(hwnd_message, &message_text)) { 314 !GetControlText(hwnd_message, &message_text)) {
315 return false; 315 return false;
316 } 316 }
317 317
318 // Format and truncate "Your desktop is shared with ..." message. 318 // Format and truncate "Your desktop is shared with ..." message.
319 message_text = ReplaceStringPlaceholders(message_text, UTF8ToUTF16(username_), 319 message_text = ReplaceStringPlaceholders(message_text,
320 base::UTF8ToUTF16(username_),
320 NULL); 321 NULL);
321 if (message_text.length() > kMaxSharingWithTextLength) 322 if (message_text.length() > kMaxSharingWithTextLength)
322 message_text.erase(kMaxSharingWithTextLength); 323 message_text.erase(kMaxSharingWithTextLength);
323 324
324 if (!SetWindowText(hwnd_message, message_text.c_str())) 325 if (!SetWindowText(hwnd_message, message_text.c_str()))
325 return false; 326 return false;
326 327
327 // Calculate the margin between controls in pixels. 328 // Calculate the margin between controls in pixels.
328 RECT rect = {0}; 329 RECT rect = {0};
329 rect.right = kWindowTextMargin; 330 rect.right = kWindowTextMargin;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 } 391 }
391 392
392 } // namespace 393 } // namespace
393 394
394 // static 395 // static
395 scoped_ptr<HostWindow> HostWindow::CreateDisconnectWindow() { 396 scoped_ptr<HostWindow> HostWindow::CreateDisconnectWindow() {
396 return scoped_ptr<HostWindow>(new DisconnectWindowWin()); 397 return scoped_ptr<HostWindow>(new DisconnectWindowWin());
397 } 398 }
398 399
399 } // namespace remoting 400 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/disconnect_window_mac.mm ('k') | remoting/host/host_event_logger_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698