Index: chrome/browser/android/bookmarks/bookmarks_bridge.cc |
diff --git a/chrome/browser/android/bookmarks/bookmarks_bridge.cc b/chrome/browser/android/bookmarks/bookmarks_bridge.cc |
index 4002907cfa7a0e49ee8d92e6314820ace53b05a4..51e6b61a35fb65503a0f204aa4289af039fd21e6 100644 |
--- a/chrome/browser/android/bookmarks/bookmarks_bridge.cc |
+++ b/chrome/browser/android/bookmarks/bookmarks_bridge.cc |
@@ -9,6 +9,7 @@ |
#include "base/prefs/pref_service.h" |
#include "chrome/browser/bookmarks/bookmark_model_factory.h" |
#include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" |
+#include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" |
#include "chrome/browser/profiles/incognito_helpers.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/profiles/profile_android.h" |
@@ -94,11 +95,18 @@ static jlong Init(JNIEnv* env, jobject obj, jobject j_profile) { |
static jlong GetNativeBookmarkModel(JNIEnv* env, |
jclass caller, |
jobject j_profile) { |
- Profile *profile = ProfileAndroid::FromProfileAndroid(j_profile); |
+ Profile* profile = ProfileAndroid::FromProfileAndroid(j_profile); |
BookmarkModel *bookmark_model_ = BookmarkModelFactory::GetForProfile(profile); |
return reinterpret_cast<jlong>(bookmark_model_); |
} |
+static jboolean IsEnhancedBookmarksFeatureEnabled(JNIEnv* env, |
+ jclass clazz, |
+ jobject j_profile) { |
+ Profile* profile = ProfileAndroid::FromProfileAndroid(j_profile); |
+ return IsEnhancedBookmarksEnabled(profile->GetPrefs()); |
+} |
+ |
static bool IsEditBookmarksEnabled() { |
return ProfileManager::GetLastUsedProfile()->GetPrefs()->GetBoolean( |
bookmarks::prefs::kEditBookmarksEnabled); |