Commit 7fb6527f authored by Sergio Villar Senin's avatar Sergio Villar Senin Committed by Commit Bot

Convert chrome/browser/feedback/show_feedback_page.cc to IdentityManager

It's currently using the SigninManager API to retrieve the currently
authenticated account's email. Replaced by the IdentityManager
equivalent API so it could eventually use the identity service.

Bug: 890776
Change-Id: I2ed33724ec940d955fbe10bfbc1eaaea29ea473a
Reviewed-on: https://chromium-review.googlesource.com/c/1280276Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Reviewed-by: default avatarRahul Chaturvedi <rkc@chromium.org>
Commit-Queue: Sergio Villar <svillar@igalia.com>
Cr-Commit-Position: refs/heads/master@{#600048}
parent ff0c00a6
......@@ -16,8 +16,8 @@
#if defined(OS_CHROMEOS)
#include "base/sys_info.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "components/signin/core/browser/signin_manager.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "services/identity/public/cpp/identity_manager.h"
#endif
namespace feedback_private = extensions::api::feedback_private;
......@@ -85,10 +85,9 @@ void ShowFeedbackPage(Browser* browser,
: feedback_private::FeedbackFlow::FEEDBACK_FLOW_REGULAR;
#if defined(OS_CHROMEOS)
SigninManagerBase* signin_manager =
SigninManagerFactory::GetForProfile(profile);
if (signin_manager &&
base::EndsWith(signin_manager->GetAuthenticatedAccountInfo().email,
auto* identity_manager = IdentityManagerFactory::GetForProfile(profile);
if (identity_manager &&
base::EndsWith(identity_manager->GetPrimaryAccountInfo().email,
kGoogleDotCom, base::CompareCase::INSENSITIVE_ASCII) &&
IsFromUserInteraction(source) && IsBluetoothLoggingAllowedByBoard()) {
flow = feedback_private::FeedbackFlow::FEEDBACK_FLOW_GOOGLEINTERNAL;
......
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