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 #include <ctype.h> | 5 #include <ctype.h> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 void Finish() { | 111 void Finish() { |
112 CHECK(running_); | 112 CHECK(running_); |
113 running_ = false; | 113 running_ = false; |
114 log_->append(1u, '.'); | 114 log_->append(1u, '.'); |
115 | 115 |
116 dispatcher_->OnJobFinished(); | 116 dispatcher_->OnJobFinished(); |
117 } | 117 } |
118 | 118 |
119 // PriorityDispatch::Job interface | 119 // PriorityDispatch::Job interface |
120 virtual void Start() OVERRIDE { | 120 virtual void Start() override { |
121 EXPECT_FALSE(running_); | 121 EXPECT_FALSE(running_); |
122 handle_ = PrioritizedDispatcher::Handle(); | 122 handle_ = PrioritizedDispatcher::Handle(); |
123 running_ = true; | 123 running_ = true; |
124 log_->append(1u, tag_); | 124 log_->append(1u, tag_); |
125 } | 125 } |
126 | 126 |
127 private: | 127 private: |
128 PrioritizedDispatcher* dispatcher_; | 128 PrioritizedDispatcher* dispatcher_; |
129 | 129 |
130 char tag_; | 130 char tag_; |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 Prepare(limits); | 560 Prepare(limits); |
561 AddJob('a', IDLE); | 561 AddJob('a', IDLE); |
562 AddJob('b', IDLE); | 562 AddJob('b', IDLE); |
563 EXPECT_DEBUG_DEATH(dispatcher_->Cancel(handle), ""); | 563 EXPECT_DEBUG_DEATH(dispatcher_->Cancel(handle), ""); |
564 } | 564 } |
565 #endif // GTEST_HAS_DEATH_TEST && !defined(NDEBUG) | 565 #endif // GTEST_HAS_DEATH_TEST && !defined(NDEBUG) |
566 | 566 |
567 } // namespace | 567 } // namespace |
568 | 568 |
569 } // namespace net | 569 } // namespace net |
OLD | NEW |