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

Side by Side Diff: chrome/android/sync_shell/chrome_main_delegate_chrome_sync_shell_android.cc

Issue 628263004: [Android] Simplify logic for grabbing initial country-code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/android/sync_shell/chrome_main_delegate_chrome_sync_shell_andro id.h" 5 #include "chrome/android/sync_shell/chrome_main_delegate_chrome_sync_shell_andro id.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_registrar.h" 8 #include "base/android/jni_registrar.h"
9 #include "components/search_engines/template_url_prepopulate_data.h"
10 #include "sync/test/fake_server/android/fake_server_helper_android.h" 9 #include "sync/test/fake_server/android/fake_server_helper_android.h"
11 10
12 static const char kDefaultCountryCode[] = "US";
13
14 ChromeMainDelegateAndroid* ChromeMainDelegateAndroid::Create() { 11 ChromeMainDelegateAndroid* ChromeMainDelegateAndroid::Create() {
15 return new ChromeMainDelegateChromeSyncShellAndroid(); 12 return new ChromeMainDelegateChromeSyncShellAndroid();
16 } 13 }
17 14
18 ChromeMainDelegateChromeSyncShellAndroid:: 15 ChromeMainDelegateChromeSyncShellAndroid::
19 ChromeMainDelegateChromeSyncShellAndroid() { 16 ChromeMainDelegateChromeSyncShellAndroid() {
20 } 17 }
21 18
22 ChromeMainDelegateChromeSyncShellAndroid:: 19 ChromeMainDelegateChromeSyncShellAndroid::
23 ~ChromeMainDelegateChromeSyncShellAndroid() { 20 ~ChromeMainDelegateChromeSyncShellAndroid() {
24 } 21 }
25 22
26 bool 23 bool
27 ChromeMainDelegateChromeSyncShellAndroid::RegisterApplicationNativeMethods( 24 ChromeMainDelegateChromeSyncShellAndroid::RegisterApplicationNativeMethods(
28 JNIEnv* env) { 25 JNIEnv* env) {
29 return ChromeMainDelegateAndroid::RegisterApplicationNativeMethods(env) && 26 return ChromeMainDelegateAndroid::RegisterApplicationNativeMethods(env) &&
30 FakeServerHelperAndroid::Register(env); 27 FakeServerHelperAndroid::Register(env);
31 } 28 }
32 29
33 bool ChromeMainDelegateChromeSyncShellAndroid::BasicStartupComplete( 30 bool ChromeMainDelegateChromeSyncShellAndroid::BasicStartupComplete(
34 int* exit_code) { 31 int* exit_code) {
35 TemplateURLPrepopulateData::InitCountryCode(kDefaultCountryCode);
36 return ChromeMainDelegateAndroid::BasicStartupComplete(exit_code); 32 return ChromeMainDelegateAndroid::BasicStartupComplete(exit_code);
37 } 33 }
38 34
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698