OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/string_split.h" |
8 #include "base/string_util.h" | 9 #include "base/string_util.h" |
9 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
10 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/download/download_util.h" | 12 #include "chrome/browser/download/download_util.h" |
12 #include "chrome/browser/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
13 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
14 | 15 |
15 DownloadPrefs::DownloadPrefs(PrefService* prefs) : prefs_(prefs) { | 16 DownloadPrefs::DownloadPrefs(PrefService* prefs) : prefs_(prefs) { |
16 prompt_for_download_.Init(prefs::kPromptForDownload, prefs, NULL); | 17 prompt_for_download_.Init(prefs::kPromptForDownload, prefs, NULL); |
17 download_path_.Init(prefs::kDownloadDefaultDirectory, prefs, NULL); | 18 download_path_.Init(prefs::kDownloadDefaultDirectory, prefs, NULL); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 extensions.erase(extensions.size() - 1); | 131 extensions.erase(extensions.size() - 1); |
131 | 132 |
132 prefs_->SetString(prefs::kDownloadExtensionsToOpen, extensions); | 133 prefs_->SetString(prefs::kDownloadExtensionsToOpen, extensions); |
133 } | 134 } |
134 | 135 |
135 bool DownloadPrefs::AutoOpenCompareFunctor::operator()( | 136 bool DownloadPrefs::AutoOpenCompareFunctor::operator()( |
136 const FilePath::StringType& a, | 137 const FilePath::StringType& a, |
137 const FilePath::StringType& b) const { | 138 const FilePath::StringType& b) const { |
138 return FilePath::CompareLessIgnoreCase(a, b); | 139 return FilePath::CompareLessIgnoreCase(a, b); |
139 } | 140 } |
OLD | NEW |