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

Unified Diff: components/prefs/scoped_user_pref_update.h

Issue 2908263002: Replace deprecated base::NonThreadSafe in components/prefs in favor of SequenceChecker. (Closed)
Patch Set: 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
« no previous file with comments | « components/prefs/pref_service.cc ('k') | components/prefs/scoped_user_pref_update.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/prefs/scoped_user_pref_update.h
diff --git a/components/prefs/scoped_user_pref_update.h b/components/prefs/scoped_user_pref_update.h
index 29859d65b33a11378b16b452a8e06c7177308d02..f8f45fc684189b60ad9b8c6a09b7efabd9af34f7 100644
--- a/components/prefs/scoped_user_pref_update.h
+++ b/components/prefs/scoped_user_pref_update.h
@@ -11,7 +11,7 @@
#include <string>
#include "base/macros.h"
-#include "base/threading/non_thread_safe.h"
+#include "base/sequence_checker.h"
#include "base/values.h"
#include "components/prefs/base_prefs_export.h"
#include "components/prefs/pref_service.h"
@@ -31,8 +31,7 @@ namespace subtle {
// We need this base class mostly for making it a friend of PrefService
// and getting access to PrefService::GetMutableUserPref and
// PrefService::ReportUserPrefChanged.
-class COMPONENTS_PREFS_EXPORT ScopedUserPrefUpdateBase
- : public base::NonThreadSafe {
+class COMPONENTS_PREFS_EXPORT ScopedUserPrefUpdateBase {
protected:
ScopedUserPrefUpdateBase(PrefService* service, const std::string& path);
@@ -54,6 +53,8 @@ class COMPONENTS_PREFS_EXPORT ScopedUserPrefUpdateBase
// Cache of value from user pref store (set between Get() and Notify() calls).
base::Value* value_;
+ SEQUENCE_CHECKER(sequence_checker_);
+
DISALLOW_COPY_AND_ASSIGN(ScopedUserPrefUpdateBase);
};
« no previous file with comments | « components/prefs/pref_service.cc ('k') | components/prefs/scoped_user_pref_update.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698