| 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/download_file_picker.h" | 5 #include "chrome/browser/download/download_file_picker.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "chrome/browser/download/download_prefs.h" | 8 #include "chrome/browser/download/download_prefs.h" |
| 9 #include "chrome/browser/platform_util.h" | 9 #include "chrome/browser/platform_util.h" |
| 10 #include "chrome/browser/ui/chrome_select_file_policy.h" | 10 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 11 #include "content/public/browser/browser_context.h" | 11 #include "content/public/browser/browser_context.h" |
| 12 #include "content/public/browser/download_item.h" | 12 #include "content/public/browser/download_item.h" |
| 13 #include "content/public/browser/download_manager.h" | 13 #include "content/public/browser/download_manager.h" |
| 14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
| 15 #include "grit/generated_resources.h" | |
| 16 #include "ui/base/l10n/l10n_util.h" | |
| 17 | 15 |
| 18 using content::DownloadItem; | 16 using content::DownloadItem; |
| 19 using content::DownloadManager; | 17 using content::DownloadManager; |
| 20 using content::WebContents; | 18 using content::WebContents; |
| 21 | 19 |
| 22 namespace { | 20 namespace { |
| 23 | 21 |
| 24 enum FilePickerResult { | 22 enum FilePickerResult { |
| 25 FILE_PICKER_SAME, | 23 FILE_PICKER_SAME, |
| 26 FILE_PICKER_DIFFERENT_DIR, | 24 FILE_PICKER_DIFFERENT_DIR, |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // Deletes |this| | 111 // Deletes |this| |
| 114 } | 112 } |
| 115 | 113 |
| 116 // static | 114 // static |
| 117 void DownloadFilePicker::ShowFilePicker(DownloadItem* item, | 115 void DownloadFilePicker::ShowFilePicker(DownloadItem* item, |
| 118 const base::FilePath& suggested_path, | 116 const base::FilePath& suggested_path, |
| 119 const FileSelectedCallback& callback) { | 117 const FileSelectedCallback& callback) { |
| 120 new DownloadFilePicker(item, suggested_path, callback); | 118 new DownloadFilePicker(item, suggested_path, callback); |
| 121 // DownloadFilePicker deletes itself. | 119 // DownloadFilePicker deletes itself. |
| 122 } | 120 } |
| OLD | NEW |