Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3223)

Unified Diff: chrome/android/sync_shell/chrome_main_delegate_chrome_sync_shell_android.cc

Issue 457883002: Use Sync FakeServer in Android tests via custom APK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/sync_shell/chrome_main_delegate_chrome_sync_shell_android.cc
diff --git a/chrome/android/sync_shell/chrome_main_delegate_chrome_sync_shell_android.cc b/chrome/android/sync_shell/chrome_main_delegate_chrome_sync_shell_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..eba89e60fa0a2e271c8c455aed8d2fc09a36f7a3
--- /dev/null
+++ b/chrome/android/sync_shell/chrome_main_delegate_chrome_sync_shell_android.cc
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/android/sync_shell/chrome_main_delegate_chrome_sync_shell_android.h"
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_registrar.h"
+#include "components/search_engines/template_url_prepopulate_data.h"
+#include "sync/test/fake_server/android/fake_server_helper_android.h"
+
+static const char kDefaultCountryCode[] = "US";
+
+ChromeMainDelegateAndroid* ChromeMainDelegateAndroid::Create() {
+ return new ChromeMainDelegateChromeSyncShellAndroid();
+}
+
+ChromeMainDelegateChromeSyncShellAndroid::
+ChromeMainDelegateChromeSyncShellAndroid() {
+}
+
+ChromeMainDelegateChromeSyncShellAndroid::
+~ChromeMainDelegateChromeSyncShellAndroid() {
+}
+
+bool
+ChromeMainDelegateChromeSyncShellAndroid::RegisterApplicationNativeMethods(
+ JNIEnv* env) {
+ return ChromeMainDelegateAndroid::RegisterApplicationNativeMethods(env) &&
+ FakeServerHelperAndroid::Register(env);
+}
+
+bool ChromeMainDelegateChromeSyncShellAndroid::BasicStartupComplete(
+ int* exit_code) {
+ TemplateURLPrepopulateData::InitCountryCode(kDefaultCountryCode);
+ return ChromeMainDelegateAndroid::BasicStartupComplete(exit_code);
+}
+

Powered by Google App Engine
This is Rietveld 408576698