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

Unified Diff: chrome/common/net/gaia/authentication_consumer_oauth.cc

Issue 6894027: Initial refactoring complete Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed some tests that were broken by previous refactoring Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/net/gaia/authentication_consumer_oauth.cc
diff --git a/chrome/common/net/gaia/authentication_consumer_oauth.cc b/chrome/common/net/gaia/authentication_consumer_oauth.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b6e1ccdc502aa3609c490eaf1399035f9a9c1380
--- /dev/null
+++ b/chrome/common/net/gaia/authentication_consumer_oauth.cc
@@ -0,0 +1,44 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/net/gaia/authentication_consumer_oauth.h"
+#include "base/logging.h"
+
+AuthenticationConsumerOAuth::AuthenticationResult::
+ AuthenticationResult() {
+}
+
+AuthenticationConsumerOAuth::AuthenticationResult::
+ AuthenticationResult(const std::string& new_sid,
+ const std::string& new_lsid,
+ const std::string& new_token,
+ const std::string& new_data)
+ : sid(new_sid),
+ lsid(new_lsid),
+ token(new_token),
+ data(new_data),
+ two_factor(false) {}
+
+AuthenticationConsumerOAuth::AuthenticationResult::
+ ~AuthenticationResult() {}
+
+bool AuthenticationConsumerOAuth::AuthenticationResult::IsValid() const {
+ return !lsid.empty() && !sid.empty();
+}
+
+bool AuthenticationConsumerOAuth::AuthenticationResult::operator==(
+ const AuthenticationResult &b) const {
+ return sid == b.sid &&
+ lsid == b.lsid &&
+ token == b.token &&
+ data == b.data &&
+ two_factor == b.two_factor;
+}
+
+// virtual
+void AuthenticationConsumerOAuth::OnIssueTokenFailure(
+ const std::string& service,
+ const GoogleServiceAuthError& error) {
+ OnIssueAuthTokenFailure(service, error);
+}
« no previous file with comments | « chrome/common/net/gaia/authentication_consumer_oauth.h ('k') | chrome/common/net/gaia/authentication_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698