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_prefs.h" | 5 #include "chrome/browser/download/download_prefs.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/prefs/pref_service.h" |
14 #include "base/string_split.h" | 15 #include "base/string_split.h" |
15 #include "base/string_util.h" | 16 #include "base/string_util.h" |
16 #include "base/sys_string_conversions.h" | 17 #include "base/sys_string_conversions.h" |
17 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
18 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 19 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
19 #include "chrome/browser/download/download_extensions.h" | 20 #include "chrome/browser/download/download_extensions.h" |
20 #include "chrome/browser/download/download_service.h" | 21 #include "chrome/browser/download/download_service.h" |
21 #include "chrome/browser/download/download_service_factory.h" | 22 #include "chrome/browser/download/download_service_factory.h" |
22 #include "chrome/browser/download/download_util.h" | 23 #include "chrome/browser/download/download_util.h" |
23 #include "chrome/browser/prefs/pref_registry_syncable.h" | 24 #include "chrome/browser/prefs/pref_registry_syncable.h" |
24 #include "chrome/browser/prefs/pref_service.h" | |
25 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
26 #include "chrome/browser/profiles/profile_manager.h" | 26 #include "chrome/browser/profiles/profile_manager.h" |
27 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
28 #include "content/public/browser/browser_thread.h" | 28 #include "content/public/browser/browser_thread.h" |
29 #include "content/public/browser/download_manager.h" | 29 #include "content/public/browser/download_manager.h" |
30 #include "content/public/browser/save_page_type.h" | 30 #include "content/public/browser/save_page_type.h" |
31 | 31 |
32 #if defined(OS_CHROMEOS) | 32 #if defined(OS_CHROMEOS) |
33 #include "chrome/browser/chromeos/drive/drive_file_system_util.h" | 33 #include "chrome/browser/chromeos/drive/drive_file_system_util.h" |
34 #include "chrome/browser/chromeos/drive/drive_system_service.h" | 34 #include "chrome/browser/chromeos/drive/drive_system_service.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 extensions.erase(extensions.size() - 1); | 206 extensions.erase(extensions.size() - 1); |
207 | 207 |
208 profile_->GetPrefs()->SetString(prefs::kDownloadExtensionsToOpen, extensions); | 208 profile_->GetPrefs()->SetString(prefs::kDownloadExtensionsToOpen, extensions); |
209 } | 209 } |
210 | 210 |
211 bool DownloadPrefs::AutoOpenCompareFunctor::operator()( | 211 bool DownloadPrefs::AutoOpenCompareFunctor::operator()( |
212 const base::FilePath::StringType& a, | 212 const base::FilePath::StringType& a, |
213 const base::FilePath::StringType& b) const { | 213 const base::FilePath::StringType& b) const { |
214 return base::FilePath::CompareLessIgnoreCase(a, b); | 214 return base::FilePath::CompareLessIgnoreCase(a, b); |
215 } | 215 } |
OLD | NEW |