Commit 2e670a95 authored by John Budorick's avatar John Budorick Committed by Commit Bot

Revert "Avoid explicit conversion for CoreAccountId on desktop platforms."

This reverts commit 75be7e87.

Reason for revert: breaks compilation on fuchsia: https://ci.chromium.org/p/chromium/builders/ci/Fuchsia%20ARM64/90020

Original change's description:
> Avoid explicit conversion for CoreAccountId on desktop platforms.
> 
> Bug: 959157
> Change-Id: I8d6a6c80a4f2aea5a84264f26b4047ca46f6e687
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1904173
> Reviewed-by: Tanmoy Mollik <triploblastic@chromium.org>
> Commit-Queue: Mihai Sardarescu <msarda@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#713817}

TBR=msarda@chromium.org,triploblastic@chromium.org

Change-Id: Ic950b9b7b4bd800b0d7c71c4ab46f17f68922137
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 959157
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1906307Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713819}
parent d7b57aec
......@@ -65,7 +65,7 @@ std::string DecryptRefreshToken(const std::string& cipher_text) {
// Finish the process of import credentials. This is either called directly
// from ImportCredentialsFromProvider() if a browser window for the profile is
// already available or is delayed until a browser can first be opened.
void FinishImportCredentialsFromProvider(const CoreAccountId& account_id,
void FinishImportCredentialsFromProvider(const std::string& account_id,
Browser* browser,
Profile* profile,
Profile::CreateStatus status) {
......@@ -111,7 +111,7 @@ void ImportCredentialsFromProvider(Profile* profile,
AboutSigninInternalsFactory::GetInstance()->GetForProfile(profile);
signin_internals->OnAuthenticationResultReceived("Credential Provider");
CoreAccountId account_id =
std::string account_id =
IdentityManagerFactory::GetForProfile(profile)
->GetAccountsMutator()
->AddOrUpdateAccount(base::UTF16ToUTF8(gaia_id),
......
......@@ -22,11 +22,9 @@ CoreAccountId::CoreAccountId(std::string&& id) : id(std::move(id)) {}
CoreAccountId::CoreAccountId(const std::string& id) : id(id) {}
#if defined(OS_CHROMEOS) || defined(OS_IOS) || defined(OS_ANDROID)
CoreAccountId::operator std::string() const {
return id;
}
#endif
bool CoreAccountId::empty() const {
return id.empty();
......
......@@ -9,8 +9,6 @@
#include <string>
#include <vector>
#include "build/build_config.h"
// Represent the id of an account for interaction with GAIA. It is
// currently implicitly convertible to and from std::string to allow
// progressive migration of the code (see https://crbug.com/959157
......@@ -24,7 +22,6 @@ struct CoreAccountId {
CoreAccountId& operator=(const CoreAccountId&);
CoreAccountId& operator=(CoreAccountId&&) noexcept;
#if defined(OS_CHROMEOS) || defined(OS_IOS) || defined(OS_ANDROID)
// Those implicit constructor and conversion operator allow to
// progressively migrate the code to use this struct. Removing
// them is tracked by https://crbug.com/959161
......@@ -32,11 +29,6 @@ struct CoreAccountId {
CoreAccountId(std::string&& id);
CoreAccountId(const std::string& id);
operator std::string() const;
#else
explicit CoreAccountId(const char* id);
explicit CoreAccountId(std::string&& id);
explicit CoreAccountId(const std::string& id);
#endif
// Checks if the account is valid or not.
// TODO(triploblastic): Possibly rename of remove this after
......
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