Commit b2020d34 authored by Sergio Villar Senin's avatar Sergio Villar Senin Committed by Commit Bot

Convert chrome_feedback_private_delegate.cc to IdentityManager

It's currently using the SigninManager to retrieve the primary
(authenticated) account's email. Migrated to the IdentityManager API
so it could eventually make use of the identity service.

Bug: 890774
Change-Id: I92e1ddafaa8270a5fdd4b154de85a4be1f8a4168
Reviewed-on: https://chromium-review.googlesource.com/c/1286138Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Sergio Villar <svillar@igalia.com>
Cr-Commit-Position: refs/heads/master@{#600439}
parent b54f7c7f
......@@ -863,6 +863,7 @@ jumbo_static_library("extensions") {
"//services/audio/public/cpp",
"//services/data_decoder/public/cpp",
"//services/device/public/mojom",
"//services/identity/public/cpp",
"//services/identity/public/mojom",
"//services/network/public/mojom",
"//services/service_manager/public/cpp",
......
......@@ -13,13 +13,13 @@
#include "chrome/browser/feedback/feedback_uploader_factory_chrome.h"
#include "chrome/browser/feedback/system_logs/chrome_system_logs_fetcher.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/ui/simple_message_box.h"
#include "chrome/grit/generated_resources.h"
#include "components/feedback/system_logs/system_logs_fetcher.h"
#include "components/signin/core/browser/signin_manager.h"
#include "components/strings/grit/components_strings.h"
#include "content/public/browser/browser_context.h"
#include "services/identity/public/cpp/identity_manager.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/webui/web_ui_util.h"
......@@ -187,10 +187,10 @@ void ChromeFeedbackPrivateDelegate::FetchAndMergeIwlwifiDumpLogsIfPresent(
std::string ChromeFeedbackPrivateDelegate::GetSignedInUserEmail(
content::BrowserContext* context) const {
SigninManagerBase* signin_manager =
SigninManagerFactory::GetForProfile(Profile::FromBrowserContext(context));
return signin_manager ? signin_manager->GetAuthenticatedAccountInfo().email
: std::string();
auto* identity_manager = IdentityManagerFactory::GetForProfile(
Profile::FromBrowserContext(context));
return identity_manager ? identity_manager->GetPrimaryAccountInfo().email
: std::string();
}
void ChromeFeedbackPrivateDelegate::NotifyFeedbackDelayed() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment