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

Side by Side Diff: remoting/protocol/rejecting_authenticator.cc

Issue 1643793002: Add policy to restrict client domain for Me2Me. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update policy documentation. Created 4 years, 10 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
OLDNEW
(Empty)
1 // Copyright 2015 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/protocol/rejecting_authenticator.h"
6
7 #include "remoting/protocol/channel_authenticator.h"
8 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
9
10 namespace remoting {
11 namespace protocol {
12
13 RejectingAuthenticator::RejectingAuthenticator(RejectionReason rejection_reason)
14 : rejection_reason_(rejection_reason) {
15 }
16
17 RejectingAuthenticator::~RejectingAuthenticator() = default;
18
19 Authenticator::State RejectingAuthenticator::state() const {
20 return state_;
21 }
22 bool RejectingAuthenticator::started() const {
23 return true;
24 }
25
26 Authenticator::RejectionReason
27 RejectingAuthenticator::rejection_reason() const {
28 DCHECK_EQ(state_, REJECTED);
29 return rejection_reason_;
30 }
31
32 void RejectingAuthenticator::ProcessMessage(
33 const buzz::XmlElement* message,
34 const base::Closure& resume_callback) {
35 DCHECK_EQ(state_, WAITING_MESSAGE);
36 state_ = REJECTED;
37 resume_callback.Run();
38 }
39
40 scoped_ptr<buzz::XmlElement> RejectingAuthenticator::GetNextMessage() {
41 NOTREACHED();
42 return nullptr;
43 }
44
45 const std::string& RejectingAuthenticator::GetAuthKey() const {
46 NOTREACHED();
47 return auth_key_;
48 };
49
50 scoped_ptr<ChannelAuthenticator>
51 RejectingAuthenticator::CreateChannelAuthenticator() const {
52 NOTREACHED();
53 return nullptr;
54 }
55
56 } // namespace protocol
57 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698