| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A helper class that assists preferences in firing notifications when lists | 5 // A helper class that assists preferences in firing notifications when lists |
| 6 // or dictionaries are changed. | 6 // or dictionaries are changed. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_PREFS_SCOPED_USER_PREF_UPDATE_H_ | 8 #ifndef CHROME_BROWSER_PREFS_SCOPED_USER_PREF_UPDATE_H_ |
| 9 #define CHROME_BROWSER_PREFS_SCOPED_USER_PREF_UPDATE_H_ | 9 #define CHROME_BROWSER_PREFS_SCOPED_USER_PREF_UPDATE_H_ |
| 10 #pragma once | 10 #pragma once |
| 11 | 11 |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/memory/scoped_ptr.h" | |
| 16 #include "base/threading/non_thread_safe.h" | 15 #include "base/threading/non_thread_safe.h" |
| 17 #include "base/values.h" | 16 #include "base/values.h" |
| 18 #include "chrome/browser/prefs/pref_service.h" | 17 #include "chrome/browser/prefs/pref_service.h" |
| 19 | 18 |
| 20 class PrefService; | 19 class PrefService; |
| 21 | 20 |
| 22 namespace base { | 21 namespace base { |
| 23 class DictionaryValue; | 22 class DictionaryValue; |
| 24 class ListValue; | 23 class ListValue; |
| 25 } | 24 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 96 |
| 98 private: | 97 private: |
| 99 DISALLOW_COPY_AND_ASSIGN(ScopedUserPrefUpdate); | 98 DISALLOW_COPY_AND_ASSIGN(ScopedUserPrefUpdate); |
| 100 }; | 99 }; |
| 101 | 100 |
| 102 typedef ScopedUserPrefUpdate<base::DictionaryValue, Value::TYPE_DICTIONARY> | 101 typedef ScopedUserPrefUpdate<base::DictionaryValue, Value::TYPE_DICTIONARY> |
| 103 DictionaryPrefUpdate; | 102 DictionaryPrefUpdate; |
| 104 typedef ScopedUserPrefUpdate<base::ListValue, Value::TYPE_LIST> ListPrefUpdate; | 103 typedef ScopedUserPrefUpdate<base::ListValue, Value::TYPE_LIST> ListPrefUpdate; |
| 105 | 104 |
| 106 #endif // CHROME_BROWSER_PREFS_SCOPED_USER_PREF_UPDATE_H_ | 105 #endif // CHROME_BROWSER_PREFS_SCOPED_USER_PREF_UPDATE_H_ |
| OLD | NEW |