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

Unified Diff: chrome/common/important_file_writer.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
Index: chrome/common/important_file_writer.h
diff --git a/chrome/common/important_file_writer.h b/chrome/common/important_file_writer.h
index 34c60674c9504f516fdb3a070eeaa0f8f4c42fe7..72a9c76370550ecb4f8fe0d4eb2cd21de6983ca4 100644
--- a/chrome/common/important_file_writer.h
+++ b/chrome/common/important_file_writer.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 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.
@@ -14,6 +14,7 @@
#include "base/threading/non_thread_safe.h"
#include "base/time.h"
#include "base/timer.h"
+#include "content/common/notification_source.h"
namespace base {
class MessageLoopProxy;
@@ -91,6 +92,8 @@ class ImportantFileWriter : public base::NonThreadSafe {
commit_interval_ = interval;
}
+ void set_notification_source(NotificationSource source) { source_ = source; }
+
private:
// Path being written to.
const FilePath path_;
@@ -107,6 +110,9 @@ class ImportantFileWriter : public base::NonThreadSafe {
// Time delta after which scheduled data will be written to disk.
base::TimeDelta commit_interval_;
+ // Used as source for PREF_COMMITTED notification.
+ NotificationSource source_;
+
DISALLOW_COPY_AND_ASSIGN(ImportantFileWriter);
};

Powered by Google App Engine
This is Rietveld 408576698