[Background Sync] Move Play Services check to a new file.

This paves way for deleting BackgroundSyncLauncher code, which is the
old way of waking up Chrome on Android to process Background Sync
registrations, and is no longer being used.

The logic that is still being used is to check whether Google Play
Services is up to date, which is checked at Chrome start up. This CL
refactors that out in to a separate class and updates C++ logic to
use the new class.

Bug: 924490
Change-Id: I4c412738e496c250a556d00408169ace1223a4a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1804484
Commit-Queue: Mugdha Lakhani <[email protected]>
Reviewed-by: Tommy Nyquist <[email protected]>
Reviewed-by: Peter Beverloo <[email protected]>
Reviewed-by: Rayan Kanso <[email protected]>
Auto-Submit: Mugdha Lakhani <[email protected]>
Cr-Commit-Position: refs/heads/master@{#698422}
diff --git a/chrome/browser/android/background_sync_launcher_android.cc b/chrome/browser/android/background_sync_launcher_android.cc
index 8e46fe8..7a0b81b 100644
--- a/chrome/browser/android/background_sync_launcher_android.cc
+++ b/chrome/browser/android/background_sync_launcher_android.cc
@@ -13,6 +13,7 @@
 #include "chrome/android/chrome_jni_headers/BackgroundSyncBackgroundTaskScheduler_jni.h"
 #include "chrome/android/chrome_jni_headers/BackgroundSyncBackgroundTask_jni.h"
 #include "chrome/android/chrome_jni_headers/BackgroundSyncLauncher_jni.h"
+#include "chrome/android/chrome_jni_headers/GooglePlayServicesChecker_jni.h"
 #include "chrome/android/chrome_jni_headers/PeriodicBackgroundSyncChromeWakeUpTask_jni.h"
 #include "chrome/browser/android/chrome_feature_list.h"
 #include "chrome/browser/profiles/profile_manager.h"
@@ -95,7 +96,7 @@
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   if (disable_play_services_version_check_for_tests)
     return false;
-  return Java_BackgroundSyncLauncher_shouldDisableBackgroundSync(
+  return Java_GooglePlayServicesChecker_shouldDisableBackgroundSync(
       base::android::AttachCurrentThread());
 }