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

Unified Diff: chrome/browser/chrome_browser_main_android.cc

Issue 497563002: [Android] Use correct enhanced bookmarks enabling logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: JNI mistake 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
Index: chrome/browser/chrome_browser_main_android.cc
diff --git a/chrome/browser/chrome_browser_main_android.cc b/chrome/browser/chrome_browser_main_android.cc
index d7adf4c2b005f24a2165bf6ee0c5918434ff8c35..58b2d9dbd34535ef4728c3c0c6fe9dd694971550 100644
--- a/chrome/browser/chrome_browser_main_android.cc
+++ b/chrome/browser/chrome_browser_main_android.cc
@@ -7,11 +7,14 @@
#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "base/path_service.h"
+#include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
#include "chrome/browser/google/google_search_counter_android.h"
+#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "components/breakpad/app/breakpad_linux.h"
#include "components/breakpad/browser/crash_dump_manager_android.h"
+#include "components/signin/core/browser/signin_manager.h"
#include "content/public/browser/android/compositor.h"
#include "content/public/common/main_function_params.h"
#include "net/android/network_change_notifier_factory_android.h"
@@ -52,7 +55,18 @@ void ChromeBrowserMainPartsAndroid::PreProfileInit() {
}
void ChromeBrowserMainPartsAndroid::PostProfileInit() {
- search_counter_.reset(new GoogleSearchCounterAndroid(profile()));
+ Profile* profilez = profile();
+
+ search_counter_.reset(new GoogleSearchCounterAndroid(profilez));
+
+ SigninManagerBase* signin = SigninManagerFactory::GetForProfile(profilez);
+ bool is_signed_in = signin && !signin->GetAuthenticatedUsername().empty();
+ UpdateBookmarksExperimentState(
+ profilez->GetPrefs(),
+ local_state(),
+ is_signed_in,
+ BOOKMARKS_EXPERIMENT_ENABLED_FROM_SYNC_UNKNOWN);
+
ChromeBrowserMainParts::PostProfileInit();
}

Powered by Google App Engine
This is Rietveld 408576698