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

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

Issue 11090063: [Chromoting] Add a simple Windows app that registers and starts a host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review. Created 8 years, 2 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "remoting/host/setup/pin_validator.h"
6
7 namespace remoting {
8
9 bool IsPinValid(const std::string& pin) {
10 if (pin.length() < 6) {
alexeypa (please no reviews) 2012/10/12 17:09:35 nit: drop {}
simonmorris 2012/10/15 16:51:42 Done.
11 return false;
12 }
13 for (size_t i = 0; i < pin.length(); i++) {
14 char c = pin[i];
15 if (c < '0' || c > '9') {
alexeypa (please no reviews) 2012/10/12 17:09:35 nit: drop {} here as well.
simonmorris 2012/10/15 16:51:42 Done.
16 return false;
17 }
18 }
19 return true;
20 }
21
22 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698