| 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 "chrome/browser/download/chrome_download_manager_delegate.h" | 5 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
| 13 #include "base/prefs/pref_member.h" |
| 13 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
| 14 #include "base/prefs/public/pref_member.h" | |
| 15 #include "base/rand_util.h" | 15 #include "base/rand_util.h" |
| 16 #include "base/stringprintf.h" | 16 #include "base/stringprintf.h" |
| 17 #include "base/time.h" | 17 #include "base/time.h" |
| 18 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
| 19 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
| 20 #include "chrome/browser/download/download_completion_blocker.h" | 20 #include "chrome/browser/download/download_completion_blocker.h" |
| 21 #include "chrome/browser/download/download_crx_util.h" | 21 #include "chrome/browser/download/download_crx_util.h" |
| 22 #include "chrome/browser/download/download_extensions.h" | 22 #include "chrome/browser/download/download_extensions.h" |
| 23 #include "chrome/browser/download/download_file_picker.h" | 23 #include "chrome/browser/download/download_file_picker.h" |
| 24 #include "chrome/browser/download/download_history.h" | 24 #include "chrome/browser/download/download_history.h" |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 // TODO(asanka): This logic is a hack. DownloadFilePicker should give us a | 889 // TODO(asanka): This logic is a hack. DownloadFilePicker should give us a |
| 890 // directory to persist. Or perhaps, if the Drive path | 890 // directory to persist. Or perhaps, if the Drive path |
| 891 // substitution logic is moved here, then we would have a | 891 // substitution logic is moved here, then we would have a |
| 892 // persistable path after the DownloadFilePicker is done. | 892 // persistable path after the DownloadFilePicker is done. |
| 893 if (disposition == DownloadItem::TARGET_DISPOSITION_PROMPT && | 893 if (disposition == DownloadItem::TARGET_DISPOSITION_PROMPT && |
| 894 !download->IsTemporary()) | 894 !download->IsTemporary()) |
| 895 last_download_path_ = target_path.DirName(); | 895 last_download_path_ = target_path.DirName(); |
| 896 } | 896 } |
| 897 callback.Run(target_path, disposition, danger_type, intermediate_path); | 897 callback.Run(target_path, disposition, danger_type, intermediate_path); |
| 898 } | 898 } |
| OLD | NEW |