OLD | NEW |
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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 // false somewhere in the chain of resource handlers. | 446 // false somewhere in the chain of resource handlers. |
448 CallStartedCB(DownloadId(), net::ERR_ACCESS_DENIED); | 447 CallStartedCB(DownloadId(), net::ERR_ACCESS_DENIED); |
449 | 448 |
450 // Remove output stream callback if a stream exists. | 449 // Remove output stream callback if a stream exists. |
451 if (stream_writer_.get()) | 450 if (stream_writer_.get()) |
452 stream_writer_->RegisterCallback(base::Closure()); | 451 stream_writer_->RegisterCallback(base::Closure()); |
453 | 452 |
454 UMA_HISTOGRAM_TIMES("SB2.DownloadDuration", | 453 UMA_HISTOGRAM_TIMES("SB2.DownloadDuration", |
455 base::TimeTicks::Now() - download_start_time_); | 454 base::TimeTicks::Now() - download_start_time_); |
456 } | 455 } |
OLD | NEW |