Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_CONTEXT_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_CONTEXT_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 // Returns true if there was changes since last call to | 64 // Returns true if there was changes since last call to |
| 65 // GetChangesAndReset(). | 65 // GetChangesAndReset(). |
| 66 bool HasChanges() const; | 66 bool HasChanges() const; |
| 67 | 67 |
| 68 // Stores all changes since the last call to the | 68 // Stores all changes since the last call to the |
| 69 // GetChangesAndReset() in |diff|. All previous contents of |diff| | 69 // GetChangesAndReset() in |diff|. All previous contents of |diff| |
| 70 // will be thrown away. | 70 // will be thrown away. |
| 71 void GetChangesAndReset(base::DictionaryValue* diff); | 71 void GetChangesAndReset(base::DictionaryValue* diff); |
| 72 | 72 |
| 73 // Applies changes from |diff| to the context. All keys from |diff| | 73 // Applies changes from |diff| to the context. All keys from |diff| |
| 74 // are stored in |keys|. | 74 // are stored in |keys|. |keys| is optional and can be NULL. |
|
Denis Kuznetsov (DE-MUC)
2014/06/11 14:29:17
"|Keys| are" ?
dzhioev (left Google)
2014/06/18 14:43:39
Rephrased to "|keys| argument is optional".
Denis Kuznetsov (DE-MUC)
2014/06/19 19:16:36
Nit : capitalize to "Keys"
dzhioev (left Google)
2014/06/20 07:24:16
It is a name of argument, I don't think we should
| |
| 75 void ApplyChanges(const base::DictionaryValue& diff, | 75 void ApplyChanges(const base::DictionaryValue& diff, |
| 76 std::vector<std::string>* keys); | 76 std::vector<std::string>* keys); |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 bool Set(const KeyType& key, base::Value* value); | 79 bool Set(const KeyType& key, base::Value* value); |
| 80 | 80 |
| 81 template<typename T> | 81 template<typename T> |
| 82 T Get(const KeyType& key) { | 82 T Get(const KeyType& key) { |
| 83 DCHECK(CalledOnValidThread()); | 83 DCHECK(CalledOnValidThread()); |
| 84 const base::Value* value; | 84 const base::Value* value; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 105 | 105 |
| 106 // Contains all pending changes. | 106 // Contains all pending changes. |
| 107 base::DictionaryValue changes_; | 107 base::DictionaryValue changes_; |
| 108 | 108 |
| 109 DISALLOW_COPY_AND_ASSIGN(ScreenContext); | 109 DISALLOW_COPY_AND_ASSIGN(ScreenContext); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 } // namespace chromeos | 112 } // namespace chromeos |
| 113 | 113 |
| 114 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_CONTEXT_H_ | 114 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_CONTEXT_H_ |
| OLD | NEW |