Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: chrome/browser/policy/logging_work_scheduler.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 12
13 using content::BrowserThread;
14
13 namespace policy { 15 namespace policy {
14 16
15 // Objects of this class are used in the priority-queue of future tasks 17 // Objects of this class are used in the priority-queue of future tasks
16 // in EventLogger. 18 // in EventLogger.
17 class EventLogger::Task { 19 class EventLogger::Task {
18 public: 20 public:
19 Task(); 21 Task();
20 Task(int64 trigger_time, 22 Task(int64 trigger_time,
21 int64 secondary_key, 23 int64 secondary_key,
22 linked_ptr<base::Closure> callback); 24 linked_ptr<base::Closure> callback);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 logger_->PostDelayedWork(callback_, delay); 181 logger_->PostDelayedWork(callback_, delay);
180 } 182 }
181 183
182 void LoggingWorkScheduler::CancelDelayedWork() { 184 void LoggingWorkScheduler::CancelDelayedWork() {
183 if (!callback_.get()) return; 185 if (!callback_.get()) return;
184 callback_->Reset(); // Erase the callback to the delayed work. 186 callback_->Reset(); // Erase the callback to the delayed work.
185 callback_.reset(NULL); // Erase the pointer to the callback. 187 callback_.reset(NULL); // Erase the pointer to the callback.
186 } 188 }
187 189
188 } // namespace policy 190 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/file_based_policy_loader.cc ('k') | chrome/browser/policy/logging_work_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698