Skip to content

Commit

Permalink
Revert "arc: Disable ARC on non-Google clients."
Browse files Browse the repository at this point in the history
This reverts commit 89417c1.

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 <khmel@google.com>
> Reviewed-by: Roger Tawa <rogerta@chromium.org>
> Reviewed-by: Luis Hector Chavez <lhchavez@chromium.org>
> Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
> 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 <khmel@chromium.org>
Commit-Queue: Yury Khmel <khmel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508746}
  • Loading branch information
yurykhmel authored and Commit Bot committed Oct 13, 2017
1 parent bf97a6d commit 7c3e36e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
13 changes: 0 additions & 13 deletions chrome/browser/chromeos/arc/arc_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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<std::set<base::FilePath>>::DestructorAtExit
g_profile_declined_set = LAZY_INSTANCE_INITIALIZER;
Expand Down Expand Up @@ -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;
}

Expand Down
4 changes: 0 additions & 4 deletions google_apis/google_api_keys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,4 @@ bool IsGoogleChromeAPIKeyUsed() {
#endif
}

bool IsClientIdOverridden() {
return GetOAuth2ClientID(CLIENT_MAIN) != GOOGLE_CLIENT_ID_MAIN;
}

} // namespace google_apis
3 changes: 0 additions & 3 deletions google_apis/google_api_keys.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_

0 comments on commit 7c3e36e

Please sign in to comment.