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

Unified Diff: chrome/browser/ui/webui/chromeos/login/authenticated_user_email_retriever.cc

Issue 2712483002: cros: Remove AuthenticatedUserEmailRetriever. (Closed)
Patch Set: Initial upload Created 3 years, 10 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
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/authenticated_user_email_retriever.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/login/authenticated_user_email_retriever.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/authenticated_user_email_retriever.cc b/chrome/browser/ui/webui/chromeos/login/authenticated_user_email_retriever.cc
deleted file mode 100644
index 91fe87e05c53e637752013a393c9b734900f3265..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/webui/chromeos/login/authenticated_user_email_retriever.cc
+++ /dev/null
@@ -1,45 +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 "chrome/browser/ui/webui/chromeos/login/authenticated_user_email_retriever.h"
-
-#include <utility>
-#include <vector>
-
-#include "google_apis/gaia/gaia_auth_util.h"
-#include "google_apis/gaia/gaia_constants.h"
-#include "google_apis/gaia/google_service_auth_error.h"
-#include "net/url_request/url_request_context_getter.h"
-
-namespace chromeos {
-
-AuthenticatedUserEmailRetriever::AuthenticatedUserEmailRetriever(
- const AuthenticatedUserEmailCallback& callback,
- scoped_refptr<net::URLRequestContextGetter> url_request_context_getter)
- : callback_(callback),
- gaia_auth_fetcher_(this,
- GaiaConstants::kChromeSource,
- url_request_context_getter.get()) {
- gaia_auth_fetcher_.StartListAccounts();
-}
-
-AuthenticatedUserEmailRetriever::~AuthenticatedUserEmailRetriever() {
-}
-
-void AuthenticatedUserEmailRetriever::OnListAccountsSuccess(
- const std::string& data) {
- std::vector<gaia::ListedAccount> accounts;
- gaia::ParseListAccountsData(data, &accounts, nullptr);
- if (accounts.size() != 1)
- callback_.Run(std::string());
- else
- callback_.Run(accounts.front().email);
-}
-
-void AuthenticatedUserEmailRetriever::OnListAccountsFailure(
- const GoogleServiceAuthError& error) {
- callback_.Run(std::string());
-}
-
-} // namespace chromeos
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/authenticated_user_email_retriever.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698