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

Side by Side Diff: chrome/browser/android/feature_utilities.cc

Issue 1637683003: Add flag to disable mmap in all sql connection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ChromeVersionInfo Created 4 years, 10 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/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
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 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java ('k') | sql/connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698