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

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

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 years, 2 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
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_file_impl.h" 5 #include "content/browser/download/download_file_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/files/file_util.h" 11 #include "base/files/file_util.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "content/browser/byte_stream.h" 15 #include "content/browser/byte_stream.h"
16 #include "content/browser/download/download_create_info.h" 16 #include "content/browser/download/download_create_info.h"
17 #include "content/browser/download/download_destination_observer.h" 17 #include "content/browser/download/download_destination_observer.h"
18 #include "content/browser/download/download_interrupt_reasons_impl.h" 18 #include "content/browser/download/download_interrupt_reasons_impl.h"
19 #include "content/browser/download/download_net_log_parameters.h" 19 #include "content/browser/download/download_net_log_parameters.h"
20 #include "content/browser/download/download_stats.h" 20 #include "content/browser/download/download_stats.h"
21 #include "content/public/browser/browser_thread.h" 21 #include "content/public/browser/browser_thread.h"
22 #include "crypto/secure_hash.h" 22 #include "crypto/secure_hash.h"
23 #include "crypto/sha2.h" 23 #include "crypto/sha2.h"
24 #include "net/base/io_buffer.h" 24 #include "net/base/io_buffer.h"
25 #include "net/log/net_log.h"
25 #include "net/log/net_log_event_type.h" 26 #include "net/log/net_log_event_type.h"
27 #include "net/log/net_log_source.h"
26 #include "net/log/net_log_source_type.h" 28 #include "net/log/net_log_source_type.h"
27 29
28 namespace content { 30 namespace content {
29 31
30 const int kUpdatePeriodMs = 500; 32 const int kUpdatePeriodMs = 500;
31 const int kMaxTimeBlockingFileThreadMs = 1000; 33 const int kMaxTimeBlockingFileThreadMs = 1000;
32 34
33 // These constants control the default retry behavior for failing renames. Each 35 // These constants control the default retry behavior for failing renames. Each
34 // retry is performed after a delay that is twice the previous delay. The 36 // retry is performed after a delay that is twice the previous delay. The
35 // initial delay is specified by kInitialRenameRetryDelayMs. 37 // initial delay is specified by kInitialRenameRetryDelayMs.
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 const base::FilePath& new_path, 358 const base::FilePath& new_path,
357 const RenameCompletionCallback& completion_callback) 359 const RenameCompletionCallback& completion_callback)
358 : option(option), 360 : option(option),
359 new_path(new_path), 361 new_path(new_path),
360 retries_left(kMaxRenameRetries), 362 retries_left(kMaxRenameRetries),
361 completion_callback(completion_callback) {} 363 completion_callback(completion_callback) {}
362 364
363 DownloadFileImpl::RenameParameters::~RenameParameters() {} 365 DownloadFileImpl::RenameParameters::~RenameParameters() {}
364 366
365 } // namespace content 367 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698