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

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

Issue 1956001: Moved XMPP notifier library from chrome/browser/sync to chrome/common.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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) 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 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_COMMUNICATOR_LOGIN_FAILURE_H_
6 #define CHROME_BROWSER_SYNC_NOTIFIER_COMMUNICATOR_LOGIN_FAILURE_H_
7
8 #include "talk/base/common.h"
9 #include "talk/xmpp/xmppengine.h"
10
11 namespace notifier {
12
13 class LoginFailure {
14 public:
15 enum LoginError {
16 // Check the xmpp_error for more information.
17 XMPP_ERROR,
18
19 // If the certificate has expired, it usually means that the computer's
20 // clock isn't set correctly.
21 CERTIFICATE_EXPIRED_ERROR,
22
23 // Apparently, there is a proxy that needs authentication information.
24 PROXY_AUTHENTICATION_ERROR,
25 };
26
27 explicit LoginFailure(LoginError error);
28 LoginFailure(LoginError error,
29 buzz::XmppEngine::Error xmpp_error,
30 int subcode);
31
32 // Used as the first level of error information.
33 LoginError error() const {
34 return error_;
35 }
36
37 // Returns the XmppEngine only. Valid if and only if error() == XMPP_ERROR.
38 //
39 // Handler should mimic logic from PhoneWindow::ShowConnectionError
40 // (except that the DiagnoseConnectionError has already been done).
41 buzz::XmppEngine::Error xmpp_error() const;
42
43 private:
44 LoginError error_;
45 buzz::XmppEngine::Error xmpp_error_;
46 int subcode_;
47
48 DISALLOW_COPY_AND_ASSIGN(LoginFailure);
49 };
50
51 } // namespace notifier
52
53 #endif // CHROME_BROWSER_SYNC_NOTIFIER_COMMUNICATOR_LOGIN_FAILURE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/notifier/communicator/login.cc ('k') | chrome/browser/sync/notifier/communicator/login_failure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698