OLD | NEW |
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/browser/android/feature_utilities.h" | 5 #include "chrome/browser/android/feature_utilities.h" |
6 | 6 |
7 #include "jni/FeatureUtilities_jni.h" | 7 #include "jni/FeatureUtilities_jni.h" |
8 | 8 |
| 9 #include "sql/connection.h" |
| 10 |
9 namespace { | 11 namespace { |
10 bool document_mode_enabled = false; | 12 bool document_mode_enabled = false; |
11 bool custom_tab_visible = false; | 13 bool custom_tab_visible = false; |
12 } // namespace | 14 } // namespace |
13 | 15 |
14 namespace chrome { | 16 namespace chrome { |
15 namespace android { | 17 namespace android { |
16 | 18 |
17 RunningModeHistogram GetDocumentModeValue() { | 19 RunningModeHistogram GetDocumentModeValue() { |
18 return document_mode_enabled ? RUNNING_MODE_DOCUMENT_MODE : | 20 return document_mode_enabled ? RUNNING_MODE_DOCUMENT_MODE : |
(...skipping 13 matching lines...) Expand all Loading... |
32 jboolean enabled) { | 34 jboolean enabled) { |
33 document_mode_enabled = enabled; | 35 document_mode_enabled = enabled; |
34 } | 36 } |
35 | 37 |
36 static void SetCustomTabVisible(JNIEnv* env, | 38 static void SetCustomTabVisible(JNIEnv* env, |
37 const JavaParamRef<jclass>& clazz, | 39 const JavaParamRef<jclass>& clazz, |
38 jboolean visible) { | 40 jboolean visible) { |
39 custom_tab_visible = visible; | 41 custom_tab_visible = visible; |
40 } | 42 } |
41 | 43 |
| 44 static void SetSqlMmapDisabledByDefault(JNIEnv* env, |
| 45 const JavaParamRef<jclass>& clazz) { |
| 46 sql::Connection::set_mmap_disabled_by_default(); |
| 47 } |
| 48 |
42 bool RegisterFeatureUtilities(JNIEnv* env) { | 49 bool RegisterFeatureUtilities(JNIEnv* env) { |
43 return RegisterNativesImpl(env); | 50 return RegisterNativesImpl(env); |
44 } | 51 } |
OLD | NEW |