| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 EXTENSIONS_COMMON_EXTENSION_SET_H_ | 5 #ifndef EXTENSIONS_COMMON_EXTENSION_SET_H_ |
| 6 #define EXTENSIONS_COMMON_EXTENSION_SET_H_ | 6 #define EXTENSIONS_COMMON_EXTENSION_SET_H_ |
| 7 | 7 |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 void set_modification_callback( | 132 void set_modification_callback( |
| 133 const ModificationCallback& modification_callback) { | 133 const ModificationCallback& modification_callback) { |
| 134 modification_callback_ = modification_callback; | 134 modification_callback_ = modification_callback; |
| 135 } | 135 } |
| 136 | 136 |
| 137 private: | 137 private: |
| 138 FRIEND_TEST_ALL_PREFIXES(ExtensionSetTest, ExtensionSet); | 138 FRIEND_TEST_ALL_PREFIXES(ExtensionSetTest, ExtensionSet); |
| 139 | 139 |
| 140 ExtensionMap extensions_; | 140 ExtensionMap extensions_; |
| 141 | 141 |
| 142 mutable base::Lock runtime_lock_; |
| 143 |
| 142 // If non-null, called with the extension ids in this set after a modification | 144 // If non-null, called with the extension ids in this set after a modification |
| 143 // occurred. This is not called on Clear() which is typically used when | 145 // occurred. This is not called on Clear() which is typically used when |
| 144 // discarding the set (e.g., on shutdown) and we do not want to track that as | 146 // discarding the set (e.g., on shutdown) and we do not want to track that as |
| 145 // a real modification. | 147 // a real modification. |
| 146 ModificationCallback modification_callback_; | 148 ModificationCallback modification_callback_; |
| 147 | 149 |
| 148 DISALLOW_COPY_AND_ASSIGN(ExtensionSet); | 150 DISALLOW_COPY_AND_ASSIGN(ExtensionSet); |
| 149 }; | 151 }; |
| 150 | 152 |
| 151 } // namespace extensions | 153 } // namespace extensions |
| 152 | 154 |
| 153 #endif // EXTENSIONS_COMMON_EXTENSION_SET_H_ | 155 #endif // EXTENSIONS_COMMON_EXTENSION_SET_H_ |
| OLD | NEW |