| Index: components/login/screens/screen_context.h
|
| diff --git a/components/login/screens/screen_context.h b/components/login/screens/screen_context.h
|
| index 665f79894e6b1b2908ae772dc6ccc702e9de851b..03fc037ae71356be06a9776f80fd4eec25314c68 100644
|
| --- a/components/login/screens/screen_context.h
|
| +++ b/components/login/screens/screen_context.h
|
| @@ -10,8 +10,8 @@
|
|
|
| #include "base/logging.h"
|
| #include "base/macros.h"
|
| +#include "base/sequence_checker.h"
|
| #include "base/strings/string16.h"
|
| -#include "base/threading/non_thread_safe.h"
|
| #include "base/values.h"
|
| #include "components/login/base_screen_handler_utils.h"
|
| #include "components/login/login_export.h"
|
| @@ -31,7 +31,7 @@ namespace login {
|
| // ScreenContext memorizes changed key-value pairs and returns them
|
| // via GetChangesAndReset() method. After call to this method an
|
| // internal buffer of changes will be cleared.
|
| -class LOGIN_EXPORT ScreenContext : public base::NonThreadSafe {
|
| +class LOGIN_EXPORT ScreenContext {
|
| public:
|
| typedef std::string KeyType;
|
| typedef base::Value ValueType;
|
| @@ -94,7 +94,7 @@ class LOGIN_EXPORT ScreenContext : public base::NonThreadSafe {
|
|
|
| template <typename T>
|
| T Get(const KeyType& key) const {
|
| - DCHECK(CalledOnValidThread());
|
| + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
| const base::Value* value;
|
| bool has_key = storage_.Get(key, &value);
|
| DCHECK(has_key);
|
| @@ -108,7 +108,7 @@ class LOGIN_EXPORT ScreenContext : public base::NonThreadSafe {
|
|
|
| template <typename T>
|
| T Get(const KeyType& key, const T& default_value) const {
|
| - DCHECK(CalledOnValidThread());
|
| + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
| if (!HasKey(key))
|
| return default_value;
|
| return Get<T>(key);
|
| @@ -120,6 +120,8 @@ class LOGIN_EXPORT ScreenContext : public base::NonThreadSafe {
|
| // Contains all pending changes.
|
| base::DictionaryValue changes_;
|
|
|
| + SEQUENCE_CHECKER(sequence_checker_);
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ScreenContext);
|
| };
|
|
|
|
|