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

Unified Diff: chrome/browser/profiles/profile_browsertest.cc

Issue 2746023002: Pref service: enable for user prefs in chrome behind a flag. (Closed)
Patch Set: no, the other pref service Created 3 years, 9 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/profiles/profile_browsertest.cc
diff --git a/chrome/browser/profiles/profile_browsertest.cc b/chrome/browser/profiles/profile_browsertest.cc
index 681c634a772ced8d011e94a962d1f1021f6ea0d9..0eca419f1e36c1f2bf0c1c445df4c05842042f4b 100644
--- a/chrome/browser/profiles/profile_browsertest.cc
+++ b/chrome/browser/profiles/profile_browsertest.cc
@@ -31,6 +31,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -690,6 +691,11 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest,
// Flush the profile data to disk for all loaded profiles.
profile->SetExitType(Profile::EXIT_CRASHED);
profile->GetPrefs()->CommitPendingWrite();
+ if (base::FeatureList::IsEnabled(features::kPrefService)) {
+ FlushTaskRunner(content::BrowserThread::GetTaskRunnerForThread(
+ content::BrowserThread::IO)
+ .get());
+ }
FlushTaskRunner(profile->GetIOTaskRunner().get());
// Make sure that the prefs file was written with the expected key/value.

Powered by Google App Engine
This is Rietveld 408576698