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

Side by Side Diff: remoting/host/setup/pin_validator.cc

Issue 1547473005: Switch to standard integer types in remoting/host/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « remoting/host/setup/oauth_helper_unittest.cc ('k') | remoting/host/setup/service_client.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 <stddef.h>
6
5 #include "remoting/host/setup/pin_validator.h" 7 #include "remoting/host/setup/pin_validator.h"
6 8
7 namespace remoting { 9 namespace remoting {
8 10
9 bool IsPinValid(const std::string& pin) { 11 bool IsPinValid(const std::string& pin) {
10 if (pin.length() < 6) 12 if (pin.length() < 6)
11 return false; 13 return false;
12 for (size_t i = 0; i < pin.length(); i++) { 14 for (size_t i = 0; i < pin.length(); i++) {
13 char c = pin[i]; 15 char c = pin[i];
14 if (c < '0' || c > '9') 16 if (c < '0' || c > '9')
15 return false; 17 return false;
16 } 18 }
17 return true; 19 return true;
18 } 20 }
19 21
20 } // namespace remoting 22 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/setup/oauth_helper_unittest.cc ('k') | remoting/host/setup/service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698