| 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 CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 }; | 264 }; |
| 265 | 265 |
| 266 // Sample usage: | 266 // Sample usage: |
| 267 // class Foo | 267 // class Foo |
| 268 // : public base::RefCountedThreadSafe< | 268 // : public base::RefCountedThreadSafe< |
| 269 // Foo, BrowserThread::DeleteOnIOThread> { | 269 // Foo, BrowserThread::DeleteOnIOThread> { |
| 270 // | 270 // |
| 271 // ... | 271 // ... |
| 272 // private: | 272 // private: |
| 273 // friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; | 273 // friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; |
| 274 // friend class DeleteTask<Foo>; | 274 // friend class base::DeleteHelper<Foo>; |
| 275 // | 275 // |
| 276 // ~Foo(); | 276 // ~Foo(); |
| 277 struct DeleteOnUIThread : public DeleteOnThread<UI> { }; | 277 struct DeleteOnUIThread : public DeleteOnThread<UI> { }; |
| 278 struct DeleteOnIOThread : public DeleteOnThread<IO> { }; | 278 struct DeleteOnIOThread : public DeleteOnThread<IO> { }; |
| 279 struct DeleteOnFileThread : public DeleteOnThread<FILE> { }; | 279 struct DeleteOnFileThread : public DeleteOnThread<FILE> { }; |
| 280 struct DeleteOnDBThread : public DeleteOnThread<DB> { }; | 280 struct DeleteOnDBThread : public DeleteOnThread<DB> { }; |
| 281 struct DeleteOnWebKitThread : public DeleteOnThread<WEBKIT_DEPRECATED> { }; | 281 struct DeleteOnWebKitThread : public DeleteOnThread<WEBKIT_DEPRECATED> { }; |
| 282 | 282 |
| 283 private: | 283 private: |
| 284 friend class BrowserThreadImpl; | 284 friend class BrowserThreadImpl; |
| 285 | 285 |
| 286 BrowserThread() {} | 286 BrowserThread() {} |
| 287 DISALLOW_COPY_AND_ASSIGN(BrowserThread); | 287 DISALLOW_COPY_AND_ASSIGN(BrowserThread); |
| 288 }; | 288 }; |
| 289 | 289 |
| 290 } // namespace content | 290 } // namespace content |
| 291 | 291 |
| 292 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ | 292 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ |
| OLD | NEW |