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

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

Issue 20609004: [Downloads] Some UMA for downloads resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | 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/download_manager_impl.h" 5 #include "content/browser/download/download_manager_impl.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 FOR_EACH_OBSERVER(Observer, observers_, 517 FOR_EACH_OBSERVER(Observer, observers_,
518 OnSavePackageSuccessfullyFinished(this, download_item)); 518 OnSavePackageSuccessfullyFinished(this, download_item));
519 } 519 }
520 520
521 // Resume a download of a specific URL. We send the request to the 521 // Resume a download of a specific URL. We send the request to the
522 // ResourceDispatcherHost, and let it send us responses like a regular 522 // ResourceDispatcherHost, and let it send us responses like a regular
523 // download. 523 // download.
524 void DownloadManagerImpl::ResumeInterruptedDownload( 524 void DownloadManagerImpl::ResumeInterruptedDownload(
525 scoped_ptr<content::DownloadUrlParameters> params, 525 scoped_ptr<content::DownloadUrlParameters> params,
526 uint32 id) { 526 uint32 id) {
527 RecordDownloadSource(INITIATED_BY_RESUMPTION);
527 BrowserThread::PostTask( 528 BrowserThread::PostTask(
528 BrowserThread::IO, 529 BrowserThread::IO,
529 FROM_HERE, 530 FROM_HERE,
530 base::Bind(&BeginDownload, base::Passed(&params), id)); 531 base::Bind(&BeginDownload, base::Passed(&params), id));
531 } 532 }
532 533
533 void DownloadManagerImpl::SetDownloadItemFactoryForTesting( 534 void DownloadManagerImpl::SetDownloadItemFactoryForTesting(
534 scoped_ptr<DownloadItemFactory> item_factory) { 535 scoped_ptr<DownloadItemFactory> item_factory) {
535 item_factory_ = item_factory.Pass(); 536 item_factory_ = item_factory.Pass();
536 } 537 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 if (delegate_) 683 if (delegate_)
683 delegate_->OpenDownload(download); 684 delegate_->OpenDownload(download);
684 } 685 }
685 686
686 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) { 687 void DownloadManagerImpl::ShowDownloadInShell(DownloadItemImpl* download) {
687 if (delegate_) 688 if (delegate_)
688 delegate_->ShowDownloadInShell(download); 689 delegate_->ShowDownloadInShell(download);
689 } 690 }
690 691
691 } // namespace content 692 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl_unittest.cc ('k') | content/browser/download/download_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698