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

Side by Side Diff: chrome/browser/download/download_completion_blocker.cc

Issue 10263019: DownloadManagerDelegate::ShouldCompleteDownload(callback) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merge Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/download/download_completion_blocker.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/download/download_completion_blocker.h"
6
7 #include "base/logging.h"
8
9 DownloadCompletionBlocker::DownloadCompletionBlocker()
10 : is_complete_(false) {
11 }
12
13 DownloadCompletionBlocker::~DownloadCompletionBlocker() {
14 }
15
16 void DownloadCompletionBlocker::CompleteDownload() {
17 DCHECK(!is_complete_);
18 is_complete_ = true;
19 if (callback_.is_null())
20 return;
21 callback_.Run();
22 callback_.Reset();
23 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_completion_blocker.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698