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 CONTENT_BROWSER_WEBUI_URL_DATA_SOURCE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEBUI_URL_DATA_SOURCE_IMPL_H_ |
6 #define CONTENT_BROWSER_WEBUI_URL_DATA_SOURCE_IMPL_H_ | 6 #define CONTENT_BROWSER_WEBUI_URL_DATA_SOURCE_IMPL_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/sequenced_task_runner_helpers.h" | 11 #include "base/sequenced_task_runner_helpers.h" |
11 #include "content/browser/webui/url_data_manager.h" | 12 #include "content/browser/webui/url_data_manager.h" |
12 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
13 | 14 |
14 namespace base { | 15 namespace base { |
15 class RefCountedMemory; | 16 class RefCountedMemory; |
16 } | 17 } |
17 | 18 |
18 namespace content { | 19 namespace content { |
19 class URLDataManagerBackend; | 20 class URLDataManagerBackend; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 84 |
84 // This field is set and maintained by URLDataManagerBackend. It is set when | 85 // This field is set and maintained by URLDataManagerBackend. It is set when |
85 // the DataSource is added, and unset if the DataSource is removed. A | 86 // the DataSource is added, and unset if the DataSource is removed. A |
86 // DataSource can be removed in two ways: the URLDataManagerBackend is | 87 // DataSource can be removed in two ways: the URLDataManagerBackend is |
87 // deleted, or another DataSource is registered with the same name. backend_ | 88 // deleted, or another DataSource is registered with the same name. backend_ |
88 // should only be accessed on the IO thread. This reference can't be via a | 89 // should only be accessed on the IO thread. This reference can't be via a |
89 // scoped_refptr else there would be a cycle between the backend and data | 90 // scoped_refptr else there would be a cycle between the backend and data |
90 // source. | 91 // source. |
91 URLDataManagerBackend* backend_; | 92 URLDataManagerBackend* backend_; |
92 | 93 |
93 scoped_ptr<URLDataSource> source_; | 94 std::unique_ptr<URLDataSource> source_; |
94 }; | 95 }; |
95 | 96 |
96 } // namespace content | 97 } // namespace content |
97 | 98 |
98 #endif // CONTENT_BROWSER_WEBUI_URL_DATA_SOURCE_IMPL_H_ | 99 #endif // CONTENT_BROWSER_WEBUI_URL_DATA_SOURCE_IMPL_H_ |
OLD | NEW |