From 7c3e36eff7045a18a303d43c378aa287a2cba5dd Mon Sep 17 00:00:00 2001 From: Yury Khmel Date: Fri, 13 Oct 2017 17:42:47 +0000 Subject: [PATCH] Revert "arc: Disable ARC on non-Google clients." This reverts commit 89417c1c1757aadc60108b362e7ab773fca2b068. Reason for revert: This would break AOSP image that does not suppose to have Play Store sign in. Original change's description: > arc: Disable ARC on non-Google clients. > > It is possible to make a Chromium build with custom client id that > defines non-Google build. In this case auth code cannot be requested > and ARC fails with server communication error. This CL disables ARC > on such builds. > > this CL this leads to SERVER_COMMUNICATION_ERROR on attempt to > use ARC. With this CL ARC UI is not available and do not > start. If I redefine client to Chrome again using oauth2-client* > flags or build Chrome build, then ARC is available again and can > be started without error. > > Test: Manually on device. Build image with mozilla client id. Without > Bug: b/67410968 > Change-Id: I6bcfcb8c5a184a52df74020552404ff86b05051b > Reviewed-on: https://chromium-review.googlesource.com/699767 > Commit-Queue: Yury Khmel > Reviewed-by: Roger Tawa > Reviewed-by: Luis Hector Chavez > Reviewed-by: Xiyuan Xia > Cr-Commit-Position: refs/heads/master@{#507883} TBR=xiyuan@chromium.org,rogerta@chromium.org,lhchavez@chromium.org,khmel@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: b/67410968 Change-Id: Ic13ec52a41b11c0ac10e7ded691ecda55ddc75f8 Reviewed-on: https://chromium-review.googlesource.com/719176 Reviewed-by: Yury Khmel Commit-Queue: Yury Khmel Cr-Commit-Position: refs/heads/master@{#508746} --- chrome/browser/chromeos/arc/arc_util.cc | 13 ------------- google_apis/google_api_keys.cc | 4 ---- google_apis/google_api_keys.h | 3 --- 3 files changed, 20 deletions(-) diff --git a/chrome/browser/chromeos/arc/arc_util.cc b/chrome/browser/chromeos/arc/arc_util.cc index 82cd1ad56a5cea..e3da123fc63206 100644 --- a/chrome/browser/chromeos/arc/arc_util.cc +++ b/chrome/browser/chromeos/arc/arc_util.cc @@ -32,7 +32,6 @@ #include "components/user_manager/known_user.h" #include "components/user_manager/user.h" #include "components/user_manager/user_manager.h" -#include "google_apis/google_api_keys.h" namespace arc { @@ -41,9 +40,6 @@ namespace { constexpr char kLsbReleaseArcVersionKey[] = "CHROMEOS_ARC_ANDROID_SDK_VERSION"; constexpr char kAndroidMSdkVersion[] = "23"; -// Used as client id on bot tests. -constexpr char kDummyClientId[] = "dummytoken"; - // Contains set of profiles for which decline reson was already reported. base::LazyInstance>::DestructorAtExit g_profile_declined_set = LAZY_INSTANCE_INITIALIZER; @@ -237,15 +233,6 @@ bool IsArcAllowedForProfile(const Profile* profile) { return false; } - if ((!google_apis::IsGoogleChromeAPIKeyUsed() && - google_apis::GetOAuth2ClientID(google_apis::CLIENT_MAIN) != - kDummyClientId) || - google_apis::IsClientIdOverridden()) { - VLOG_IF(1, IsReportingFirstTimeForProfile(profile)) - << "ARC is not supported for non-google client."; - return false; - } - return true; } diff --git a/google_apis/google_api_keys.cc b/google_apis/google_api_keys.cc index 1ba1d296d6b1bd..2e8437ed136e68 100644 --- a/google_apis/google_api_keys.cc +++ b/google_apis/google_api_keys.cc @@ -360,8 +360,4 @@ bool IsGoogleChromeAPIKeyUsed() { #endif } -bool IsClientIdOverridden() { - return GetOAuth2ClientID(CLIENT_MAIN) != GOOGLE_CLIENT_ID_MAIN; -} - } // namespace google_apis diff --git a/google_apis/google_api_keys.h b/google_apis/google_api_keys.h index b99112ede14880..20d896ef5f7d21 100644 --- a/google_apis/google_api_keys.h +++ b/google_apis/google_api_keys.h @@ -120,9 +120,6 @@ std::string GetSpdyProxyAuthValue(); // Google Chrome. bool IsGoogleChromeAPIKeyUsed(); -// Returns true if client id is overridden. -bool IsClientIdOverridden(); - } // namespace google_apis #endif // GOOGLE_APIS_GOOGLE_API_KEYS_H_