OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/net/file_downloader.h" | 5 #include "chrome/browser/net/file_downloader.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/threading/sequenced_worker_pool.h" | |
12 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
13 #include "net/base/load_flags.h" | 12 #include "net/base/load_flags.h" |
14 #include "net/http/http_status_code.h" | 13 #include "net/http/http_status_code.h" |
15 #include "net/url_request/url_fetcher.h" | 14 #include "net/url_request/url_fetcher.h" |
16 #include "url/gurl.h" | 15 #include "url/gurl.h" |
17 | 16 |
18 using content::BrowserThread; | 17 using content::BrowserThread; |
19 using net::URLFetcher; | 18 using net::URLFetcher; |
20 | 19 |
21 const int kNumRetries = 1; | 20 const int kNumRetries = 1; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 } | 95 } |
97 | 96 |
98 void FileDownloader::OnFileMoveDone(bool success) { | 97 void FileDownloader::OnFileMoveDone(bool success) { |
99 if (!success) { | 98 if (!success) { |
100 DLOG(WARNING) << "Could not move file to " | 99 DLOG(WARNING) << "Could not move file to " |
101 << local_path_.LossyDisplayName(); | 100 << local_path_.LossyDisplayName(); |
102 } | 101 } |
103 | 102 |
104 callback_.Run(success ? DOWNLOADED : FAILED); | 103 callback_.Run(success ? DOWNLOADED : FAILED); |
105 } | 104 } |
OLD | NEW |