| 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.h" | 5 #include "chrome/browser/download/save_package_file_picker.h" | 
| 6 | 6 | 
| 7 #include "base/bind.h" | 7 #include "base/bind.h" | 
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" | 
| 9 #include "base/i18n/file_util_icu.h" | 9 #include "base/i18n/file_util_icu.h" | 
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" | 
| 11 #include "base/prefs/pref_member.h" | 11 #include "base/prefs/pref_member.h" | 
| 12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" | 
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" | 
| 14 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 14 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 
| 15 #include "chrome/browser/download/download_prefs.h" | 15 #include "chrome/browser/download/download_prefs.h" | 
| 16 #include "chrome/browser/platform_util.h" | 16 #include "chrome/browser/platform_util.h" | 
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" | 
| 18 #include "chrome/browser/ui/chrome_select_file_policy.h" | 18 #include "chrome/browser/ui/chrome_select_file_policy.h" | 
| 19 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" | 
| 20 #include "chrome/grit/generated_resources.h" | 20 #include "chrome/grit/generated_resources.h" | 
| 21 #include "content/public/browser/download_manager.h" | 21 #include "content/public/browser/download_manager.h" | 
| 22 #include "content/public/browser/render_process_host.h" | 22 #include "content/public/browser/render_process_host.h" | 
| 23 #include "content/public/browser/save_page_type.h" | 23 #include "content/public/browser/save_page_type.h" | 
| 24 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" | 
| 25 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" | 
| 26 | 26 | 
| 27 #if defined(OS_CHROMEOS) | 27 #if defined(OS_CHROMEOS) | 
| 28 #include "chrome/browser/chromeos/drive/download_handler.h" | 28 #include "chrome/browser/chromeos/drive/download_handler.h" | 
| 29 #include "chrome/browser/chromeos/drive/file_system_util.h" | 29 #include "chrome/browser/chromeos/drive/file_system_core_util.h" | 
| 30 #endif | 30 #endif | 
| 31 | 31 | 
| 32 using content::RenderProcessHost; | 32 using content::RenderProcessHost; | 
| 33 using content::SavePageType; | 33 using content::SavePageType; | 
| 34 using content::WebContents; | 34 using content::WebContents; | 
| 35 | 35 | 
| 36 namespace { | 36 namespace { | 
| 37 | 37 | 
| 38 // If false, we don't prompt the user as to where to save the file.  This | 38 // If false, we don't prompt the user as to where to save the file.  This | 
| 39 // exists only for testing. | 39 // exists only for testing. | 
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 279   } | 279   } | 
| 280 #endif | 280 #endif | 
| 281 | 281 | 
| 282   callback_.Run(path_copy, save_type, | 282   callback_.Run(path_copy, save_type, | 
| 283                 base::Bind(&OnSavePackageDownloadCreated)); | 283                 base::Bind(&OnSavePackageDownloadCreated)); | 
| 284 } | 284 } | 
| 285 | 285 | 
| 286 void SavePackageFilePicker::FileSelectionCanceled(void* unused_params) { | 286 void SavePackageFilePicker::FileSelectionCanceled(void* unused_params) { | 
| 287   delete this; | 287   delete this; | 
| 288 } | 288 } | 
| OLD | NEW | 
|---|