| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/translate/core/browser/translate_prefs.h" | 5 #include "components/translate/core/browser/translate_prefs.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/prefs/scoped_user_pref_update.h" | 10 #include "base/prefs/scoped_user_pref_update.h" |
| 11 #include "base/strings/string_split.h" | 11 #include "base/strings/string_split.h" |
| 12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
| 13 #include "build/build_config.h" |
| 13 #include "components/pref_registry/pref_registry_syncable.h" | 14 #include "components/pref_registry/pref_registry_syncable.h" |
| 14 #include "components/translate/core/browser/translate_accept_languages.h" | 15 #include "components/translate/core/browser/translate_accept_languages.h" |
| 15 #include "components/translate/core/browser/translate_download_manager.h" | 16 #include "components/translate/core/browser/translate_download_manager.h" |
| 16 #include "components/translate/core/common/translate_util.h" | 17 #include "components/translate/core/common/translate_util.h" |
| 17 | 18 |
| 18 namespace translate { | 19 namespace translate { |
| 19 | 20 |
| 20 const char TranslatePrefs::kPrefTranslateSiteBlacklist[] = | 21 const char TranslatePrefs::kPrefTranslateSiteBlacklist[] = |
| 21 "translate_site_blacklist"; | 22 "translate_site_blacklist"; |
| 22 const char TranslatePrefs::kPrefTranslateWhitelists[] = | 23 const char TranslatePrefs::kPrefTranslateWhitelists[] = |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 const base::ListValue* blacklist = prefs_->GetList(pref_id); | 626 const base::ListValue* blacklist = prefs_->GetList(pref_id); |
| 626 return (blacklist == NULL || blacklist->empty()); | 627 return (blacklist == NULL || blacklist->empty()); |
| 627 } | 628 } |
| 628 | 629 |
| 629 bool TranslatePrefs::IsDictionaryEmpty(const char* pref_id) const { | 630 bool TranslatePrefs::IsDictionaryEmpty(const char* pref_id) const { |
| 630 const base::DictionaryValue* dict = prefs_->GetDictionary(pref_id); | 631 const base::DictionaryValue* dict = prefs_->GetDictionary(pref_id); |
| 631 return (dict == NULL || dict->empty()); | 632 return (dict == NULL || dict->empty()); |
| 632 } | 633 } |
| 633 | 634 |
| 634 } // namespace translate | 635 } // namespace translate |
| OLD | NEW |