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

Unified Diff: blimp/client/app/linux/blimp_client_context_delegate_linux.cc

Issue 2349073002: Blimp Settings framework on the c++ side (Closed)
Patch Set: fix trybot error Created 4 years, 2 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: blimp/client/app/linux/blimp_client_context_delegate_linux.cc
diff --git a/blimp/client/app/linux/blimp_client_context_delegate_linux.cc b/blimp/client/app/linux/blimp_client_context_delegate_linux.cc
index d7003d907f365df1720b5a184e1c560affc831a9..786b677022bc93bfffe82027684ba18a1806b441 100644
--- a/blimp/client/app/linux/blimp_client_context_delegate_linux.cc
+++ b/blimp/client/app/linux/blimp_client_context_delegate_linux.cc
@@ -4,13 +4,26 @@
#include "base/memory/ptr_util.h"
#include "blimp/client/app/linux/blimp_client_context_delegate_linux.h"
+#include "blimp/client/core/settings/settings_prefs.h"
#include "blimp/client/support/session/blimp_default_identity_provider.h"
+#include "components/pref_registry/pref_registry_syncable.h"
+#include "components/prefs/pref_service.h"
+#include "components/prefs/pref_service_factory.h"
#include "net/base/net_errors.h"
namespace blimp {
namespace client {
-BlimpClientContextDelegateLinux::BlimpClientContextDelegateLinux() = default;
+BlimpClientContextDelegateLinux::BlimpClientContextDelegateLinux()
+ : pref_registry_(new ::user_prefs::PrefRegistrySyncable()) {
+ // Set up PrefRegistry.
+ pref_registry_->RegisterBooleanPref(prefs::kBlimpEnabled, false);
+ pref_registry_->RegisterBooleanPref(prefs::kRecordWholeDocument, false);
+
+ // Set up PrefService.
+ PrefServiceFactory pref_service_factory;
+ pref_service_ = pref_service_factory.Create(pref_registry_.get());
+}
BlimpClientContextDelegateLinux::~BlimpClientContextDelegateLinux() = default;

Powered by Google App Engine
This is Rietveld 408576698