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

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

Issue 111373008: Update some uses of char16 to use the base:: namespace. (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 | « ppapi/shared_impl/ppb_gamepad_shared.h ('k') | remoting/host/win/launch_process_with_token.h » ('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 "remoting/host/verify_config_window_win.h" 5 #include "remoting/host/verify_config_window_win.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlwin.h> 8 #include <atlwin.h>
9 #include <windows.h> 9 #include <windows.h>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 y = std::min(y, area_rect.bottom - width); 101 y = std::min(y, area_rect.bottom - width);
102 102
103 SetWindowPos(NULL, x, y, -1, -1, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE); 103 SetWindowPos(NULL, x, y, -1, -1, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
104 } 104 }
105 105
106 bool VerifyConfigWindowWin::VerifyHostSecretHash() { 106 bool VerifyConfigWindowWin::VerifyHostSecretHash() {
107 CWindow pin_edit(GetDlgItem(IDC_PIN)); 107 CWindow pin_edit(GetDlgItem(IDC_PIN));
108 108
109 // Get the PIN length. 109 // Get the PIN length.
110 int pin_length = pin_edit.GetWindowTextLength(); 110 int pin_length = pin_edit.GetWindowTextLength();
111 scoped_ptr<char16[]> pin(new char16[pin_length + 1]); 111 scoped_ptr<base::char16[]> pin(new base::char16[pin_length + 1]);
112 112
113 // Get the PIN making sure it is NULL terminated even if an error occurs. 113 // Get the PIN making sure it is NULL terminated even if an error occurs.
114 int result = pin_edit.GetWindowText(pin.get(), pin_length + 1); 114 int result = pin_edit.GetWindowText(pin.get(), pin_length + 1);
115 pin[std::min(result, pin_length)] = 0; 115 pin[std::min(result, pin_length)] = 0;
116 116
117 return VerifyHostPinHash(host_secret_hash_, host_id_, UTF16ToUTF8(pin.get())); 117 return VerifyHostPinHash(host_secret_hash_, host_id_, UTF16ToUTF8(pin.get()));
118 } 118 }
119 119
120 } // namespace remoting 120 } // namespace remoting
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppb_gamepad_shared.h ('k') | remoting/host/win/launch_process_with_token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698