| 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" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 DownloadPrefs::~DownloadPrefs() { | 80 DownloadPrefs::~DownloadPrefs() { |
| 81 } | 81 } |
| 82 | 82 |
| 83 // static | 83 // static |
| 84 void DownloadPrefs::RegisterUserPrefs(PrefRegistrySyncable* registry) { | 84 void DownloadPrefs::RegisterUserPrefs(PrefRegistrySyncable* registry) { |
| 85 registry->RegisterBooleanPref(prefs::kPromptForDownload, | 85 registry->RegisterBooleanPref(prefs::kPromptForDownload, |
| 86 false, | 86 false, |
| 87 PrefRegistrySyncable::SYNCABLE_PREF); | 87 PrefRegistrySyncable::SYNCABLE_PREF); |
| 88 registry->RegisterStringPref(prefs::kDownloadExtensionsToOpen, | 88 registry->RegisterStringPref(prefs::kDownloadExtensionsToOpen, |
| 89 "", | 89 std::string(), |
| 90 PrefRegistrySyncable::UNSYNCABLE_PREF); | 90 PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 91 registry->RegisterBooleanPref(prefs::kDownloadDirUpgraded, | 91 registry->RegisterBooleanPref(prefs::kDownloadDirUpgraded, |
| 92 false, | 92 false, |
| 93 PrefRegistrySyncable::UNSYNCABLE_PREF); | 93 PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 94 registry->RegisterIntegerPref(prefs::kSaveFileType, | 94 registry->RegisterIntegerPref(prefs::kSaveFileType, |
| 95 content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, | 95 content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, |
| 96 PrefRegistrySyncable::UNSYNCABLE_PREF); | 96 PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 97 | 97 |
| 98 // The default download path is userprofile\download. | 98 // The default download path is userprofile\download. |
| 99 const base::FilePath& default_download_path = | 99 const base::FilePath& default_download_path = |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 extensions.erase(extensions.size() - 1); | 203 extensions.erase(extensions.size() - 1); |
| 204 | 204 |
| 205 profile_->GetPrefs()->SetString(prefs::kDownloadExtensionsToOpen, extensions); | 205 profile_->GetPrefs()->SetString(prefs::kDownloadExtensionsToOpen, extensions); |
| 206 } | 206 } |
| 207 | 207 |
| 208 bool DownloadPrefs::AutoOpenCompareFunctor::operator()( | 208 bool DownloadPrefs::AutoOpenCompareFunctor::operator()( |
| 209 const base::FilePath::StringType& a, | 209 const base::FilePath::StringType& a, |
| 210 const base::FilePath::StringType& b) const { | 210 const base::FilePath::StringType& b) const { |
| 211 return base::FilePath::CompareLessIgnoreCase(a, b); | 211 return base::FilePath::CompareLessIgnoreCase(a, b); |
| 212 } | 212 } |
| OLD | NEW |