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

Side by Side Diff: chrome/browser/sync/notifier/communicator/login_failure.cc

Issue 194065: Initial commit of sync engine code to browser/sync.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fixes to gtest include path, reverted syncapi. Created 11 years, 3 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 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 "chrome/browser/sync/notifier/communicator/login_failure.h"
6
7 #include "talk/xmpp/prexmppauth.h"
8
9 namespace notifier {
10
11 LoginFailure::LoginFailure(LoginError error)
12 : error_(error),
13 xmpp_error_(buzz::XmppEngine::ERROR_NONE),
14 subcode_(0) {
15 }
16
17 LoginFailure::LoginFailure(LoginError error,
18 buzz::XmppEngine::Error xmpp_error,
19 int subcode)
20 : error_(error),
21 xmpp_error_(xmpp_error),
22 subcode_(subcode) {
23 }
24
25 LoginFailure::LoginFailure(LoginError error,
26 buzz::XmppEngine::Error xmpp_error,
27 int subcode,
28 const buzz::CaptchaChallenge& captcha)
29 : error_(error),
30 xmpp_error_(xmpp_error),
31 subcode_(subcode),
32 captcha_(new buzz::CaptchaChallenge(captcha)) {
33 }
34
35 buzz::XmppEngine::Error LoginFailure::xmpp_error() const {
36 ASSERT(error_ == XMPP_ERROR);
37 return xmpp_error_;
38 }
39
40 const buzz::CaptchaChallenge& LoginFailure::captcha() const {
41 ASSERT(xmpp_error_ == buzz::XmppEngine::ERROR_UNAUTHORIZED ||
42 xmpp_error_ == buzz::XmppEngine::ERROR_MISSING_USERNAME);
43 return *captcha_.get();
44 }
45 } // namespace notifier
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698