| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 IOS_WEB_PUBLIC_WEB_THREAD_H_ | 5 #ifndef IOS_WEB_PUBLIC_WEB_THREAD_H_ |
| 6 #define IOS_WEB_PUBLIC_WEB_THREAD_H_ | 6 #define IOS_WEB_PUBLIC_WEB_THREAD_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // Foo, web::WebThread::DeleteOnIOThread> { | 251 // Foo, web::WebThread::DeleteOnIOThread> { |
| 252 // | 252 // |
| 253 // ... | 253 // ... |
| 254 // private: | 254 // private: |
| 255 // friend struct web::WebThread::DeleteOnThread<web::WebThread::IO>; | 255 // friend struct web::WebThread::DeleteOnThread<web::WebThread::IO>; |
| 256 // friend class base::DeleteHelper<Foo>; | 256 // friend class base::DeleteHelper<Foo>; |
| 257 // | 257 // |
| 258 // ~Foo(); | 258 // ~Foo(); |
| 259 // | 259 // |
| 260 // Sample usage with scoped_ptr: | 260 // Sample usage with scoped_ptr: |
| 261 // scoped_ptr<Foo, web::WebThread::DeleteOnIOThread> ptr; | 261 // std::unique_ptr<Foo, web::WebThread::DeleteOnIOThread> ptr; |
| 262 struct DeleteOnUIThread : public DeleteOnThread<UI> {}; | 262 struct DeleteOnUIThread : public DeleteOnThread<UI> {}; |
| 263 struct DeleteOnIOThread : public DeleteOnThread<IO> {}; | 263 struct DeleteOnIOThread : public DeleteOnThread<IO> {}; |
| 264 struct DeleteOnFileThread : public DeleteOnThread<FILE> {}; | 264 struct DeleteOnFileThread : public DeleteOnThread<FILE> {}; |
| 265 struct DeleteOnDBThread : public DeleteOnThread<DB> {}; | 265 struct DeleteOnDBThread : public DeleteOnThread<DB> {}; |
| 266 | 266 |
| 267 private: | 267 private: |
| 268 friend class WebThreadImpl; | 268 friend class WebThreadImpl; |
| 269 | 269 |
| 270 WebThread() {} | 270 WebThread() {} |
| 271 DISALLOW_COPY_AND_ASSIGN(WebThread); | 271 DISALLOW_COPY_AND_ASSIGN(WebThread); |
| 272 }; | 272 }; |
| 273 | 273 |
| 274 } // namespace web | 274 } // namespace web |
| 275 | 275 |
| 276 #endif // IOS_WEB_PUBLIC_WEB_THREAD_H_ | 276 #endif // IOS_WEB_PUBLIC_WEB_THREAD_H_ |
| OLD | NEW |