summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrogerta <rogerta@chromium.org>2015-06-03 15:02:24 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-03 22:02:57 +0000
commit77462d9466908defb96b675006f91c4b7a5b7ad3 (patch)
tree9ad3cfa6b079a1c6b849c12cfa7b0c62f95f951d
parentbfee1d047f9974694c59a0e336c5198a807e276f (diff)
downloadchromium_src-77462d9466908defb96b675006f91c4b7a5b7ad3.zip
chromium_src-77462d9466908defb96b675006f91c4b7a5b7ad3.tar.gz
chromium_src-77462d9466908defb96b675006f91c4b7a5b7ad3.tar.bz2
Remove dead code.
BUG=None Review URL: https://codereview.chromium.org/1154103004 Cr-Commit-Position: refs/heads/master@{#332705}
-rw-r--r--chrome/browser/ui/webui/signin/inline_login_handler_impl.h2
-rw-r--r--components/signin.gypi2
-rw-r--r--components/signin/core/browser/BUILD.gn2
-rw-r--r--components/signin/core/browser/account_reconcilor.h1
-rw-r--r--components/signin/core/browser/signin_oauth_helper.cc70
-rw-r--r--components/signin/core/browser/signin_oauth_helper.h59
6 files changed, 0 insertions, 136 deletions
diff --git a/chrome/browser/ui/webui/signin/inline_login_handler_impl.h b/chrome/browser/ui/webui/signin/inline_login_handler_impl.h
index 29182e2..b5815ad 100644
--- a/chrome/browser/ui/webui/signin/inline_login_handler_impl.h
+++ b/chrome/browser/ui/webui/signin/inline_login_handler_impl.h
@@ -12,8 +12,6 @@
#include "chrome/browser/ui/sync/one_click_signin_sync_starter.h"
#include "chrome/browser/ui/webui/signin/inline_login_handler.h"
-class GaiaAuthFetcher;
-
// Implementation for the inline login WebUI handler on desktop Chrome. Once
// CrOS migrates to the same webview approach as desktop Chrome, much of the
// code in this class should move to its base class |InlineLoginHandler|.
diff --git a/components/signin.gypi b/components/signin.gypi
index 7a081c3..642a3d0 100644
--- a/components/signin.gypi
+++ b/components/signin.gypi
@@ -75,8 +75,6 @@
'signin/core/browser/signin_manager_cookie_helper.h',
'signin/core/browser/signin_metrics.cc',
'signin/core/browser/signin_metrics.h',
- 'signin/core/browser/signin_oauth_helper.cc',
- 'signin/core/browser/signin_oauth_helper.h',
'signin/core/browser/signin_tracker.cc',
'signin/core/browser/signin_tracker.h',
'signin/core/browser/webdata/token_service_table.cc',
diff --git a/components/signin/core/browser/BUILD.gn b/components/signin/core/browser/BUILD.gn
index eb4353c..297288e 100644
--- a/components/signin/core/browser/BUILD.gn
+++ b/components/signin/core/browser/BUILD.gn
@@ -33,8 +33,6 @@ static_library("browser") {
"signin_manager_cookie_helper.h",
"signin_metrics.cc",
"signin_metrics.h",
- "signin_oauth_helper.cc",
- "signin_oauth_helper.h",
"signin_tracker.cc",
"signin_tracker.h",
"webdata/token_service_table.cc",
diff --git a/components/signin/core/browser/account_reconcilor.h b/components/signin/core/browser/account_reconcilor.h
index fd91a0c..801be87 100644
--- a/components/signin/core/browser/account_reconcilor.h
+++ b/components/signin/core/browser/account_reconcilor.h
@@ -27,7 +27,6 @@
#include "google_apis/gaia/google_service_auth_error.h"
#include "google_apis/gaia/oauth2_token_service.h"
-class GaiaAuthFetcher;
class ProfileOAuth2TokenService;
class SigninClient;
diff --git a/components/signin/core/browser/signin_oauth_helper.cc b/components/signin/core/browser/signin_oauth_helper.cc
deleted file mode 100644
index cfe7ce7..0000000
--- a/components/signin/core/browser/signin_oauth_helper.cc
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2014 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 "components/signin/core/browser/signin_oauth_helper.h"
-
-#include "base/message_loop/message_loop.h"
-#include "google_apis/gaia/gaia_auth_fetcher.h"
-#include "google_apis/gaia/gaia_constants.h"
-
-SigninOAuthHelper::SigninOAuthHelper(net::URLRequestContextGetter* getter,
- const std::string& session_index,
- const std::string& signin_scoped_device_id,
- Consumer* consumer)
- : gaia_auth_fetcher_(this, GaiaConstants::kChromeSource, getter),
- consumer_(consumer) {
- DCHECK(consumer_);
- DCHECK(getter);
- DCHECK(!session_index.empty());
- gaia_auth_fetcher_.StartCookieForOAuthLoginTokenExchangeWithDeviceId(
- session_index, signin_scoped_device_id);
-}
-
-SigninOAuthHelper::~SigninOAuthHelper() {}
-
-void SigninOAuthHelper::OnClientOAuthSuccess(const ClientOAuthResult& result) {
- refresh_token_ = result.refresh_token;
- gaia_auth_fetcher_.StartOAuthLogin(result.access_token,
- GaiaConstants::kGaiaService);
-}
-
-void SigninOAuthHelper::OnClientOAuthFailure(
- const GoogleServiceAuthError& error) {
- VLOG(1) << "SigninOAuthHelper::OnClientOAuthFailure: " << error.ToString();
- consumer_->OnSigninOAuthInformationFailure(error);
-}
-
-void SigninOAuthHelper::OnClientLoginSuccess(const ClientLoginResult& result) {
- gaia_auth_fetcher_.StartGetUserInfo(result.lsid);
-}
-
-void SigninOAuthHelper::OnClientLoginFailure(
- const GoogleServiceAuthError& error) {
- VLOG(1) << "SigninOAuthHelper::OnClientLoginFailure: " << error.ToString();
- consumer_->OnSigninOAuthInformationFailure(error);
-}
-
-void SigninOAuthHelper::OnGetUserInfoSuccess(const UserInfoMap& data) {
- UserInfoMap::const_iterator email_iter = data.find("email");
- UserInfoMap::const_iterator display_email_iter = data.find("displayEmail");
- if (email_iter == data.end() || display_email_iter == data.end()) {
- VLOG(1) << "SigninOAuthHelper::OnGetUserInfoSuccess: no email found:"
- << " email=" << email_iter->second
- << " displayEmail=" << display_email_iter->second;
- consumer_->OnSigninOAuthInformationFailure(
- GoogleServiceAuthError(GoogleServiceAuthError::SERVICE_ERROR));
- } else {
- VLOG(1) << "SigninOAuthHelper::OnGetUserInfoSuccess:"
- << " email=" << email_iter->second
- << " displayEmail=" << display_email_iter->second;
- consumer_->OnSigninOAuthInformationAvailable(
- email_iter->second, display_email_iter->second, refresh_token_);
- }
-}
-
-void SigninOAuthHelper::OnGetUserInfoFailure(
- const GoogleServiceAuthError& error) {
- VLOG(1) << "SigninOAuthHelper::OnGetUserInfoFailure : " << error.ToString();
- consumer_->OnSigninOAuthInformationFailure(error);
-}
diff --git a/components/signin/core/browser/signin_oauth_helper.h b/components/signin/core/browser/signin_oauth_helper.h
deleted file mode 100644
index 12de65b..0000000
--- a/components/signin/core/browser/signin_oauth_helper.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2014 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.
-
-#ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_OAUTH_HELPER_H_
-#define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_OAUTH_HELPER_H_
-
-#include <string>
-
-#include "base/memory/scoped_ptr.h"
-#include "google_apis/gaia/gaia_auth_consumer.h"
-#include "google_apis/gaia/gaia_auth_fetcher.h"
-
-// Retrieves the OAuth2 information from an already signed in cookie jar.
-// The information retrieved is: username, refresh token.
-class SigninOAuthHelper : public GaiaAuthConsumer {
- public:
- // Implemented by users of SigninOAuthHelper to know then helper is finished.
- class Consumer {
- public:
- virtual ~Consumer() {}
-
- // Called when all the information is retrieved successfully. |email|
- // and |display_email| correspond to the gaia properties called "email"
- // and "displayEmail" associated with the signed in account. |refresh_token|
- // is the account's login-scoped oauth2 refresh token.
- virtual void OnSigninOAuthInformationAvailable(
- const std::string& email,
- const std::string& display_email,
- const std::string& refresh_token) {}
-
- // Called when an error occurs while getting the information.
- virtual void OnSigninOAuthInformationFailure(
- const GoogleServiceAuthError& error) {}
- };
-
- explicit SigninOAuthHelper(net::URLRequestContextGetter* getter,
- const std::string& session_index,
- const std::string& signin_scoped_device_id,
- Consumer* consumer);
- ~SigninOAuthHelper() override;
-
- private:
- // Overridden from GaiaAuthConsumer.
- void OnClientOAuthSuccess(const ClientOAuthResult& result) override;
- void OnClientOAuthFailure(const GoogleServiceAuthError& error) override;
- void OnClientLoginSuccess(const ClientLoginResult& result) override;
- void OnClientLoginFailure(const GoogleServiceAuthError& error) override;
- void OnGetUserInfoSuccess(const UserInfoMap& data) override;
- void OnGetUserInfoFailure(const GoogleServiceAuthError& error) override;
-
- GaiaAuthFetcher gaia_auth_fetcher_;
- std::string refresh_token_;
- Consumer* consumer_;
-
- DISALLOW_COPY_AND_ASSIGN(SigninOAuthHelper);
-};
-
-#endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_OAUTH_HELPER_H_