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

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/delayed_callback_runner.cc

Issue 470213002: Moving all the incident reporting stuff to a common folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@binsign
Patch Set: Created 6 years, 4 months 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
OLDNEW
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 "chrome/browser/safe_browsing/delayed_callback_runner.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/delayed_callback_runne r.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 8
9 namespace safe_browsing { 9 namespace safe_browsing {
10 10
11 DelayedCallbackRunner::DelayedCallbackRunner( 11 DelayedCallbackRunner::DelayedCallbackRunner(
12 base::TimeDelta delay, 12 base::TimeDelta delay,
13 const scoped_refptr<base::TaskRunner>& task_runner) 13 const scoped_refptr<base::TaskRunner>& task_runner)
14 : task_runner_(task_runner), 14 : task_runner_(task_runner),
15 next_callback_(callbacks_.end()), 15 next_callback_(callbacks_.end()),
(...skipping 26 matching lines...) Expand all
42 // Run the next callback on the task runner. 42 // Run the next callback on the task runner.
43 task_runner_->PostTask(FROM_HERE, *next_callback_); 43 task_runner_->PostTask(FROM_HERE, *next_callback_);
44 44
45 // Remove this callback and get ready for the next if there is one. 45 // Remove this callback and get ready for the next if there is one.
46 next_callback_ = callbacks_.erase(next_callback_); 46 next_callback_ = callbacks_.erase(next_callback_);
47 if (next_callback_ != callbacks_.end()) 47 if (next_callback_ != callbacks_.end())
48 timer_.Reset(); 48 timer_.Reset();
49 } 49 }
50 50
51 } // namespace safe_browsing 51 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698