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

Unified Diff: chrome/android/shell/chrome_main_delegate_chrome_shell_for_test_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/shell/chrome_main_delegate_chrome_shell_for_test_android.cc
diff --git a/chrome/android/shell/chrome_main_delegate_chrome_shell_android.cc b/chrome/android/shell/chrome_main_delegate_chrome_shell_for_test_android.cc
similarity index 50%
copy from chrome/android/shell/chrome_main_delegate_chrome_shell_android.cc
copy to chrome/android/shell/chrome_main_delegate_chrome_shell_for_test_android.cc
index 6e9b7c3a1177fd0ebef32b0775cce7d222fbaaae..d1c6ed54ec4fafb91c2a29c80c4a104fbb746fe4 100644
--- a/chrome/android/shell/chrome_main_delegate_chrome_shell_android.cc
+++ b/chrome/android/shell/chrome_main_delegate_chrome_shell_for_test_android.cc
@@ -2,25 +2,35 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/android/shell/chrome_main_delegate_chrome_shell_android.h"
+#include "chrome/android/shell/chrome_main_delegate_chrome_shell_for_test_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 ChromeMainDelegateChromeShellAndroid();
+ return new ChromeMainDelegateChromeShellForTestAndroid();
}
-ChromeMainDelegateChromeShellAndroid::ChromeMainDelegateChromeShellAndroid() {
+ChromeMainDelegateChromeShellForTestAndroid::
+ChromeMainDelegateChromeShellForTestAndroid() {
}
-ChromeMainDelegateChromeShellAndroid::~ChromeMainDelegateChromeShellAndroid() {
+ChromeMainDelegateChromeShellForTestAndroid::
+~ChromeMainDelegateChromeShellForTestAndroid() {
}
-bool ChromeMainDelegateChromeShellAndroid::BasicStartupComplete(
+bool
+ChromeMainDelegateChromeShellForTestAndroid::RegisterApplicationNativeMethods(
+ JNIEnv* env) {
+ return ChromeMainDelegateAndroid::RegisterApplicationNativeMethods(env) &&
rlarocque 2014/08/09 01:19:59 I noticed the caller (chromium/src/chrome/app/andr
pval...(no longer on Chromium) 2014/08/12 01:21:35 I feel like what I did here is in the spirit of ho
Yaron 2014/08/12 17:22:03 It probably shouldn't. :(
rlarocque 2014/08/12 22:02:27 It also leaves things half-initialized if the seco
pval...(no longer on Chromium) 2014/08/14 00:35:39 I think we should keep this code as-is and add a T
rlarocque 2014/08/14 00:44:02 SGTM
+ FakeServerHelperAndroid::Register(env);
+}
+
+bool ChromeMainDelegateChromeShellForTestAndroid::BasicStartupComplete(
int* exit_code) {
TemplateURLPrepopulateData::InitCountryCode(kDefaultCountryCode);
return ChromeMainDelegateAndroid::BasicStartupComplete(exit_code);

Powered by Google App Engine
This is Rietveld 408576698