OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/policy/logging_work_scheduler.h" | 5 #include "chrome/browser/policy/logging_work_scheduler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "content/browser/browser_thread.h" | 10 #include "content/browser/browser_thread.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 logger_->PostDelayedWork(callback_, delay); | 141 logger_->PostDelayedWork(callback_, delay); |
142 } | 142 } |
143 | 143 |
144 void LoggingWorkScheduler::CancelDelayedWork() { | 144 void LoggingWorkScheduler::CancelDelayedWork() { |
145 if (!callback_.get()) return; | 145 if (!callback_.get()) return; |
146 callback_->Reset(); // Erase the callback to the delayed work. | 146 callback_->Reset(); // Erase the callback to the delayed work. |
147 callback_.reset(NULL); // Erase the pointer to the callback. | 147 callback_.reset(NULL); // Erase the pointer to the callback. |
148 } | 148 } |
149 | 149 |
150 } // namespace policy | 150 } // namespace policy |
| 151 |
OLD | NEW |