Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1416)

Side by Side Diff: components/translate/core/browser/translate_prefs.cc

Issue 378253002: Fix translate namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing android build errors Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "components/pref_registry/pref_registry_syncable.h" 13 #include "components/pref_registry/pref_registry_syncable.h"
14 #include "components/translate/core/browser/translate_accept_languages.h" 14 #include "components/translate/core/browser/translate_accept_languages.h"
15 #include "components/translate/core/browser/translate_download_manager.h" 15 #include "components/translate/core/browser/translate_download_manager.h"
16 #include "components/translate/core/common/translate_util.h" 16 #include "components/translate/core/common/translate_util.h"
17 17
18 namespace translate {
19
18 const char TranslatePrefs::kPrefTranslateLanguageBlacklist[] = 20 const char TranslatePrefs::kPrefTranslateLanguageBlacklist[] =
19 "translate_language_blacklist"; 21 "translate_language_blacklist";
20 const char TranslatePrefs::kPrefTranslateSiteBlacklist[] = 22 const char TranslatePrefs::kPrefTranslateSiteBlacklist[] =
21 "translate_site_blacklist"; 23 "translate_site_blacklist";
22 const char TranslatePrefs::kPrefTranslateWhitelists[] = 24 const char TranslatePrefs::kPrefTranslateWhitelists[] =
23 "translate_whitelists"; 25 "translate_whitelists";
24 const char TranslatePrefs::kPrefTranslateDeniedCount[] = 26 const char TranslatePrefs::kPrefTranslateDeniedCount[] =
25 "translate_denied_count"; 27 "translate_denied_count";
26 const char TranslatePrefs::kPrefTranslateAcceptedCount[] = 28 const char TranslatePrefs::kPrefTranslateAcceptedCount[] =
27 "translate_accepted_count"; 29 "translate_accepted_count";
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 567
566 bool TranslatePrefs::IsListEmpty(const char* pref_id) const { 568 bool TranslatePrefs::IsListEmpty(const char* pref_id) const {
567 const base::ListValue* blacklist = prefs_->GetList(pref_id); 569 const base::ListValue* blacklist = prefs_->GetList(pref_id);
568 return (blacklist == NULL || blacklist->empty()); 570 return (blacklist == NULL || blacklist->empty());
569 } 571 }
570 572
571 bool TranslatePrefs::IsDictionaryEmpty(const char* pref_id) const { 573 bool TranslatePrefs::IsDictionaryEmpty(const char* pref_id) const {
572 const base::DictionaryValue* dict = prefs_->GetDictionary(pref_id); 574 const base::DictionaryValue* dict = prefs_->GetDictionary(pref_id);
573 return (dict == NULL || dict->empty()); 575 return (dict == NULL || dict->empty());
574 } 576 }
577
578 } // namespace translate
OLDNEW
« no previous file with comments | « components/translate/core/browser/translate_prefs.h ('k') | components/translate/core/browser/translate_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698