summaryrefslogtreecommitdiffstats
path: root/chrome/browser/translate
diff options
context:
space:
mode:
authorskrul@chromium.org <skrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-02 17:36:18 +0000
committerskrul@chromium.org <skrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-02 17:36:18 +0000
commitecde2747b368a859e01614c7894fca25f670f1e5 (patch)
treedc4f54c2601f376cb60d0a45547cf85b27ee35c0 /chrome/browser/translate
parent585d1c413d6316fc0e0be535f9eafb74ab4d0236 (diff)
downloadchromium_src-ecde2747b368a859e01614c7894fca25f670f1e5.zip
chromium_src-ecde2747b368a859e01614c7894fca25f670f1e5.tar.gz
chromium_src-ecde2747b368a859e01614c7894fca25f670f1e5.tar.bz2
Add a bunch of preferences to sync.
This includes a fix for not crashing when we encounter a preference that is not registered. BUG=39958 Review URL: http://codereview.chromium.org/1571006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43497 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/translate')
-rw-r--r--chrome/browser/translate/translate_prefs.cc7
-rw-r--r--chrome/browser/translate/translate_prefs.h5
2 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/translate/translate_prefs.cc b/chrome/browser/translate/translate_prefs.cc
index 3077cb0..1beb0ee 100644
--- a/chrome/browser/translate/translate_prefs.cc
+++ b/chrome/browser/translate/translate_prefs.cc
@@ -7,11 +7,12 @@
#include "base/string_util.h"
#include "chrome/browser/pref_service.h"
-static const wchar_t kPrefTranslateLanguageBlacklist[] =
+const wchar_t TranslatePrefs::kPrefTranslateLanguageBlacklist[] =
L"translate_language_blacklist";
-static const wchar_t kPrefTranslateSiteBlacklist[] =
+const wchar_t TranslatePrefs::kPrefTranslateSiteBlacklist[] =
L"translate_site_blacklist";
-static const wchar_t kPrefTranslateWhitelists[] = L"translate_whitelists";
+const wchar_t TranslatePrefs::kPrefTranslateWhitelists[] =
+ L"translate_whitelists";
// TranslatePrefs: public: -----------------------------------------------------
diff --git a/chrome/browser/translate/translate_prefs.h b/chrome/browser/translate/translate_prefs.h
index 542dacc..01a93c1 100644
--- a/chrome/browser/translate/translate_prefs.h
+++ b/chrome/browser/translate/translate_prefs.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_PREFS_H_
#define CHROME_BROWSER_TRANSLATE_TRANSLATE_PREFS_H_
+#include <string>
#include <vector>
#include "googleurl/src/gurl.h"
@@ -14,6 +15,10 @@ class PrefService;
class TranslatePrefs {
public:
+ static const wchar_t kPrefTranslateLanguageBlacklist[];
+ static const wchar_t kPrefTranslateSiteBlacklist[];
+ static const wchar_t kPrefTranslateWhitelists[];
+
explicit TranslatePrefs(PrefService* user_prefs);
bool IsLanguageBlacklisted(const std::string& original_language);