| OLD | NEW |
| 1 // Copyright (c) 2012 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 #ifndef BASE_SUPPORTS_USER_DATA_H_ | 5 #ifndef BASE_SUPPORTS_USER_DATA_H_ |
| 6 #define BASE_SUPPORTS_USER_DATA_H_ | 6 #define BASE_SUPPORTS_USER_DATA_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
| 11 #include "base/macros.h" |
| 11 #include "base/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
| 12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 13 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
| 14 | 15 |
| 15 namespace base { | 16 namespace base { |
| 16 | 17 |
| 17 // This is a helper for classes that want to allow users to stash random data by | 18 // This is a helper for classes that want to allow users to stash random data by |
| 18 // key. At destruction all the objects will be destructed. | 19 // key. At destruction all the objects will be destructed. |
| 19 class BASE_EXPORT SupportsUserData { | 20 class BASE_EXPORT SupportsUserData { |
| 20 public: | 21 public: |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 scoped_refptr<T> object_; | 75 scoped_refptr<T> object_; |
| 75 | 76 |
| 76 DISALLOW_COPY_AND_ASSIGN(UserDataAdapter); | 77 DISALLOW_COPY_AND_ASSIGN(UserDataAdapter); |
| 77 }; | 78 }; |
| 78 | 79 |
| 79 } // namespace base | 80 } // namespace base |
| 80 | 81 |
| 81 #endif // BASE_SUPPORTS_USER_DATA_H_ | 82 #endif // BASE_SUPPORTS_USER_DATA_H_ |
| OLD | NEW |