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

Unified Diff: chrome/common/json_pref_store.h

Issue 6713032: Provide lazy CommitPendingWrites in addition to eager SavePersistentPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for test Created 9 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
« no previous file with comments | « chrome/common/important_file_writer.cc ('k') | chrome/common/json_pref_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/json_pref_store.h
diff --git a/chrome/common/json_pref_store.h b/chrome/common/json_pref_store.h
index d5970b95f948d5a1214319ae9d56eb52ab35ed51..6688f2f5514a2c75a1d59e0c335d1048535a7ae6 100644
--- a/chrome/common/json_pref_store.h
+++ b/chrome/common/json_pref_store.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -29,6 +29,7 @@ class JsonPrefStore : public PersistentPrefStore,
public:
// |file_message_loop_proxy| is the MessageLoopProxy for a thread on which
// file I/O can be done.
+ // |source| is source to be used for sending PREF_COMMMITTED notification.
JsonPrefStore(const FilePath& pref_filename,
base::MessageLoopProxy* file_message_loop_proxy);
virtual ~JsonPrefStore();
@@ -46,6 +47,8 @@ class JsonPrefStore : public PersistentPrefStore,
virtual PrefReadError ReadPrefs();
virtual bool WritePrefs();
virtual void ScheduleWritePrefs();
+ virtual void CommitPendingWrite();
+ void SetNotificationSource(const NotificationSource& source);
Mattias Nissler (ping if slow) 2011/03/23 15:12:37 This is not well-defined. Note that a PrefStore ca
// TODO(battre) remove this function
virtual void ReportValueChanged(const std::string& key);
@@ -62,6 +65,9 @@ class JsonPrefStore : public PersistentPrefStore,
// Helper for safely writing pref data.
ImportantFileWriter writer_;
+ // Source for PREF_COMMITTED notification.
+ NotificationSource source_;
+
ObserverList<PrefStore::Observer, true> observers_;
DISALLOW_COPY_AND_ASSIGN(JsonPrefStore);
« no previous file with comments | « chrome/common/important_file_writer.cc ('k') | chrome/common/json_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698