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

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

Issue 10799005: Replace the DownloadFileManager with direct ownership (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to LKGR. Created 8 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_resource_handler.h" 5 #include "content/browser/download/download_resource_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/message_loop_proxy.h" 11 #include "base/message_loop_proxy.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/metrics/stats_counters.h" 13 #include "base/metrics/stats_counters.h"
14 #include "base/stringprintf.h" 14 #include "base/stringprintf.h"
15 #include "content/browser/download/download_create_info.h" 15 #include "content/browser/download/download_create_info.h"
16 #include "content/browser/download/download_file_manager.h"
17 #include "content/browser/download/download_interrupt_reasons_impl.h" 16 #include "content/browser/download/download_interrupt_reasons_impl.h"
18 #include "content/browser/download/download_manager_impl.h" 17 #include "content/browser/download/download_manager_impl.h"
19 #include "content/browser/download/download_request_handle.h" 18 #include "content/browser/download/download_request_handle.h"
20 #include "content/browser/download/byte_stream.h" 19 #include "content/browser/download/byte_stream.h"
21 #include "content/browser/download/download_stats.h" 20 #include "content/browser/download/download_stats.h"
22 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" 21 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h"
23 #include "content/browser/renderer_host/resource_request_info_impl.h" 22 #include "content/browser/renderer_host/resource_request_info_impl.h"
24 #include "content/public/browser/browser_thread.h" 23 #include "content/public/browser/browser_thread.h"
25 #include "content/public/browser/download_interrupt_reasons.h" 24 #include "content/public/browser/download_interrupt_reasons.h"
26 #include "content/public/browser/download_item.h" 25 #include "content/public/browser/download_item.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 // false somewhere in the chain of resource handlers. 433 // false somewhere in the chain of resource handlers.
435 CallStartedCB(DownloadId(), net::ERR_ACCESS_DENIED); 434 CallStartedCB(DownloadId(), net::ERR_ACCESS_DENIED);
436 435
437 // Remove output stream callback if a stream exists. 436 // Remove output stream callback if a stream exists.
438 if (stream_writer_.get()) 437 if (stream_writer_.get())
439 stream_writer_->RegisterCallback(base::Closure()); 438 stream_writer_->RegisterCallback(base::Closure());
440 439
441 UMA_HISTOGRAM_TIMES("SB2.DownloadDuration", 440 UMA_HISTOGRAM_TIMES("SB2.DownloadDuration",
442 base::TimeTicks::Now() - download_start_time_); 441 base::TimeTicks::Now() - download_start_time_);
443 } 442 }
OLDNEW
« no previous file with comments | « content/browser/download/download_manager_impl_unittest.cc ('k') | content/browser/download/mock_download_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698