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 #include "ios/web/web_thread_impl.h" | 5 #include "ios/web/web_thread_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/atomicops.h" | 9 #include "base/atomicops.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
| 13 #include "base/macros.h" |
13 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
14 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
15 #include "base/threading/sequenced_worker_pool.h" | 16 #include "base/threading/sequenced_worker_pool.h" |
16 #include "base/threading/thread_restrictions.h" | 17 #include "base/threading/thread_restrictions.h" |
17 #include "ios/web/public/web_thread_delegate.h" | 18 #include "ios/web/public/web_thread_delegate.h" |
18 #include "net/disk_cache/simple/simple_backend_impl.h" | 19 #include "net/disk_cache/simple/simple_backend_impl.h" |
19 #include "net/url_request/url_fetcher.h" | 20 #include "net/url_request/url_fetcher.h" |
20 | 21 |
21 namespace web { | 22 namespace web { |
22 | 23 |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 AtomicWord* storage = | 504 AtomicWord* storage = |
504 reinterpret_cast<AtomicWord*>(&globals.thread_delegates[identifier]); | 505 reinterpret_cast<AtomicWord*>(&globals.thread_delegates[identifier]); |
505 AtomicWord old_pointer = base::subtle::NoBarrier_AtomicExchange( | 506 AtomicWord old_pointer = base::subtle::NoBarrier_AtomicExchange( |
506 storage, reinterpret_cast<AtomicWord>(delegate)); | 507 storage, reinterpret_cast<AtomicWord>(delegate)); |
507 | 508 |
508 // This catches registration when previously registered. | 509 // This catches registration when previously registered. |
509 DCHECK(!delegate || !old_pointer); | 510 DCHECK(!delegate || !old_pointer); |
510 } | 511 } |
511 | 512 |
512 } // namespace web | 513 } // namespace web |
OLD | NEW |