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

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

Issue 9235084: Add OSSTATUS_LOG API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
1 // Copyright (c) 2011 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/user_authenticator.h" 5 #include "remoting/host/user_authenticator.h"
6 6
7 #include <Security/Security.h> 7 #include <Security/Security.h>
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/logging.h" 12 #include "base/mac/mac_logging.h"
13 13
14 namespace remoting { 14 namespace remoting {
15 15
16 namespace { 16 namespace {
17 17
18 class UserAuthenticatorMac : public UserAuthenticator { 18 class UserAuthenticatorMac : public UserAuthenticator {
19 public: 19 public:
20 UserAuthenticatorMac() {} 20 UserAuthenticatorMac() {}
21 virtual ~UserAuthenticatorMac() {} 21 virtual ~UserAuthenticatorMac() {}
22 virtual bool Authenticate(const std::string& username, 22 virtual bool Authenticate(const std::string& username,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 kAuthorizationFlagExtendRights, 63 kAuthorizationFlagExtendRights,
64 NULL); 64 NULL);
65 switch (status) { 65 switch (status) {
66 case errAuthorizationSuccess: 66 case errAuthorizationSuccess:
67 return true; 67 return true;
68 68
69 case errAuthorizationDenied: 69 case errAuthorizationDenied:
70 return false; 70 return false;
71 71
72 default: 72 default:
73 LOG(ERROR) << "AuthorizationCreate returned " << status; 73 OSSTATUS_LOG(ERROR, status) << "AuthorizationCreate";
wtc 2012/01/28 00:06:26 Nit: should we add "failed" to the error message?
Wez 2012/01/28 00:11:52 I think there's enough of a distinction between fa
74 return false; 74 return false;
75 } 75 }
76 } 76 }
77 77
78 } // namespace 78 } // namespace
79 79
80 // static 80 // static
81 UserAuthenticator* UserAuthenticator::Create() { 81 UserAuthenticator* UserAuthenticator::Create() {
82 return new UserAuthenticatorMac(); 82 return new UserAuthenticatorMac();
83 } 83 }
84 84
85 } // namespace remoting 85 } // namespace remoting
OLDNEW
« net/base/x509_certificate_mac.cc ('K') | « net/socket/ssl_client_socket_nss.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698