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

Side by Side Diff: content/browser/download/drag_download_util.cc

Issue 10068037: RefCounted types should not have public destructors, content/browser part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MSVC fixes Created 8 years, 8 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
OLDNEW
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 "content/browser/download/drag_download_util.h" 5 #include "content/browser/download/drag_download_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 return NULL; 93 return NULL;
94 } 94 }
95 95
96 PromiseFileFinalizer::PromiseFileFinalizer( 96 PromiseFileFinalizer::PromiseFileFinalizer(
97 DragDownloadFile* drag_file_downloader) 97 DragDownloadFile* drag_file_downloader)
98 : drag_file_downloader_(drag_file_downloader) { 98 : drag_file_downloader_(drag_file_downloader) {
99 } 99 }
100 100
101 PromiseFileFinalizer::~PromiseFileFinalizer() {}
102
103 void PromiseFileFinalizer::Cleanup() {
104 if (drag_file_downloader_.get())
105 drag_file_downloader_ = NULL;
106 }
107
108 void PromiseFileFinalizer::OnDownloadCompleted(const FilePath& file_path) { 101 void PromiseFileFinalizer::OnDownloadCompleted(const FilePath& file_path) {
109 BrowserThread::PostTask( 102 BrowserThread::PostTask(
110 BrowserThread::UI, FROM_HERE, 103 BrowserThread::UI, FROM_HERE,
111 base::Bind(&PromiseFileFinalizer::Cleanup, this)); 104 base::Bind(&PromiseFileFinalizer::Cleanup, this));
112 } 105 }
113 106
114 void PromiseFileFinalizer::OnDownloadAborted() { 107 void PromiseFileFinalizer::OnDownloadAborted() {
115 BrowserThread::PostTask( 108 BrowserThread::PostTask(
116 BrowserThread::UI, FROM_HERE, 109 BrowserThread::UI, FROM_HERE,
117 base::Bind(&PromiseFileFinalizer::Cleanup, this)); 110 base::Bind(&PromiseFileFinalizer::Cleanup, this));
118 } 111 }
119 112
113 PromiseFileFinalizer::~PromiseFileFinalizer() {}
114
115 void PromiseFileFinalizer::Cleanup() {
116 if (drag_file_downloader_.get())
117 drag_file_downloader_ = NULL;
118 }
119
120 } // namespace drag_download_util 120 } // namespace drag_download_util
OLDNEW
« no previous file with comments | « content/browser/download/drag_download_util.h ('k') | content/browser/fileapi/chrome_blob_storage_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698