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/save_package_file_picker_chromeos.h" | 5 #include "chrome/browser/download/save_package_file_picker_chromeos.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/i18n/file_util_icu.h" | 9 #include "base/i18n/file_util_icu.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
11 #include "chrome/browser/chromeos/drive/drive_download_observer.h" | 11 #include "chrome/browser/chromeos/drive/drive_download_observer.h" |
12 #include "chrome/browser/chromeos/drive/drive_file_system_util.h" | 12 #include "chrome/browser/chromeos/drive/drive_file_system_util.h" |
13 #include "chrome/browser/platform_util.h" | 13 #include "chrome/browser/platform_util.h" |
14 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
15 #include "chrome/browser/ui/chrome_select_file_policy.h" | 15 #include "chrome/browser/ui/chrome_select_file_policy.h" |
16 #include "content/public/browser/browser_thread.h" | |
17 #include "content/public/browser/download_item.h" | 16 #include "content/public/browser/download_item.h" |
18 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
19 #include "ui/base/dialogs/selected_file_info.h" | 18 #include "ui/base/dialogs/selected_file_info.h" |
20 | 19 |
21 namespace { | 20 namespace { |
22 | 21 |
23 // If false, we don't prompt the user as to where to save the file. This | 22 // If false, we don't prompt the user as to where to save the file. This |
24 // exists only for testing. | 23 // exists only for testing. |
25 bool g_should_prompt_for_filename = true; | 24 bool g_should_prompt_for_filename = true; |
26 | 25 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 } else { | 103 } else { |
105 callback_.Run(selected_path, content::SAVE_PAGE_TYPE_AS_MHTML, | 104 callback_.Run(selected_path, content::SAVE_PAGE_TYPE_AS_MHTML, |
106 content::SavePackageDownloadCreatedCallback()); | 105 content::SavePackageDownloadCreatedCallback()); |
107 } | 106 } |
108 delete this; | 107 delete this; |
109 } | 108 } |
110 | 109 |
111 void SavePackageFilePickerChromeOS::FileSelectionCanceled(void* params) { | 110 void SavePackageFilePickerChromeOS::FileSelectionCanceled(void* params) { |
112 delete this; | 111 delete this; |
113 } | 112 } |
OLD | NEW |