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

Unified Diff: chrome/browser/android/bookmarks/bookmarks_bridge.cc

Issue 497563002: [Android] Use correct enhanced bookmarks enabling logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo indent fix 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/bookmarks/enhanced_bookmarks_features.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7cd704af9ffb109dc649c64c43aa1fe404c48c6a..112af39a2c1374dae47629a00f34db5623245121 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"
@@ -99,6 +100,13 @@ static jlong GetNativeBookmarkModel(JNIEnv* env,
return reinterpret_cast<jlong>(bookmark_model_);
}
+static jboolean IsEnhancedBookmarksFeatureEnabled(JNIEnv* env,
+ jclass clazz,
+ jobject j_profile) {
+ Profile *profile = ProfileAndroid::FromProfileAndroid(j_profile);
Yaron 2014/09/03 01:11:25 nit: Profile* profile (I guess this is consistent
Kibeom Kim (inactive) 2014/09/03 06:33:28 Done.
+ return IsEnhancedBookmarksEnabled(profile->GetPrefs());
+}
+
static bool IsEditBookmarksEnabled() {
return ProfileManager::GetLastUsedProfile()->GetPrefs()->GetBoolean(
prefs::kEditBookmarksEnabled);
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/bookmarks/enhanced_bookmarks_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698