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

Unified Diff: services/preferences/persistent_pref_store_factory.cc

Issue 2856083002: Pref service: support for incognito prefs (Closed)
Patch Set: Rebase Created 3 years, 7 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: services/preferences/persistent_pref_store_factory.cc
diff --git a/services/preferences/persistent_pref_store_factory.cc b/services/preferences/persistent_pref_store_factory.cc
index 587ac96d1828ed0ee3995e1f8cb911f595f94c70..352ebaf2bd6bd01582ecaba7e0e3a35f0d2c4491 100644
--- a/services/preferences/persistent_pref_store_factory.cc
+++ b/services/preferences/persistent_pref_store_factory.cc
@@ -7,6 +7,7 @@
#include <memory>
#include <utility>
+#include "components/prefs/in_memory_pref_store.h"
#include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_filter.h"
#include "services/preferences/persistent_pref_store_impl.h"
@@ -44,6 +45,10 @@ std::unique_ptr<PersistentPrefStoreImpl> CreatePersistentPrefStore(
std::move(configuration->get_tracked_configuration()), worker_pool),
std::move(on_initialized));
}
+ if (configuration->is_incognito_configuration()) {
+ return base::MakeUnique<PersistentPrefStoreImpl>(new InMemoryPrefStore(),
+ std::move(on_initialized));
+ }
NOTREACHED();
return nullptr;
}
« no previous file with comments | « components/sync_preferences/pref_service_syncable_factory.cc ('k') | services/preferences/persistent_pref_store_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698