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

Side by Side Diff: jingle/notifier/base/gaia_token_pre_xmpp_auth.cc

Issue 10829424: Create stub jingle library for iOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Correct copyright Created 8 years, 4 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) 2011 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 "jingle/notifier/base/gaia_token_pre_xmpp_auth.h" 5 #include "jingle/notifier/base/gaia_token_pre_xmpp_auth.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 30 matching lines...) Expand all
41 auth->SetAttr(QN_GOOGLE_AUTH_CLIENT_USES_FULL_BIND_RESULT, "true"); 41 auth->SetAttr(QN_GOOGLE_AUTH_CLIENT_USES_FULL_BIND_RESULT, "true");
42 return auth; 42 return auth;
43 } 43 }
44 44
45 private: 45 private:
46 DISALLOW_COPY_AND_ASSIGN(GaiaCookieMechanism); 46 DISALLOW_COPY_AND_ASSIGN(GaiaCookieMechanism);
47 }; 47 };
48 48
49 } // namespace 49 } // namespace
50 50
51 // By default use a Google cookie auth mechanism.
52 const char GaiaTokenPreXmppAuth::kDefaultAuthMechanism[] = "X-GOOGLE-TOKEN";
53
54 GaiaTokenPreXmppAuth::GaiaTokenPreXmppAuth( 51 GaiaTokenPreXmppAuth::GaiaTokenPreXmppAuth(
55 const std::string& username, 52 const std::string& username,
56 const std::string& token, 53 const std::string& token,
57 const std::string& token_service, 54 const std::string& token_service,
58 const std::string& auth_mechanism) 55 const std::string& auth_mechanism)
59 : username_(username), 56 : username_(username),
60 token_(token), 57 token_(token),
61 token_service_(token_service), 58 token_service_(token_service),
62 auth_mechanism_(auth_mechanism) { 59 auth_mechanism_(auth_mechanism) {
63 DCHECK(!auth_mechanism_.empty()); 60 DCHECK(!auth_mechanism_.empty());
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 108
112 buzz::SaslMechanism* GaiaTokenPreXmppAuth::CreateSaslMechanism( 109 buzz::SaslMechanism* GaiaTokenPreXmppAuth::CreateSaslMechanism(
113 const std::string& mechanism) { 110 const std::string& mechanism) {
114 if (mechanism == auth_mechanism_) 111 if (mechanism == auth_mechanism_)
115 return new GaiaCookieMechanism( 112 return new GaiaCookieMechanism(
116 mechanism, username_, token_, token_service_); 113 mechanism, username_, token_, token_service_);
117 return NULL; 114 return NULL;
118 } 115 }
119 116
120 } // namespace notifier 117 } // namespace notifier
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698