diff options
author | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 14:01:21 +0000 |
---|---|---|
committer | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 14:01:21 +0000 |
commit | 6ae3d4909757757f27940369e1bdc67eebd52b87 (patch) | |
tree | b95726d81214d6824646008e53d870d0ee8f2feb /chrome_frame/policy_settings.h | |
parent | b85e5120573c61b9bdd492fb903b334bf1119d8f (diff) | |
download | chromium_src-6ae3d4909757757f27940369e1bdc67eebd52b87.zip chromium_src-6ae3d4909757757f27940369e1bdc67eebd52b87.tar.gz chromium_src-6ae3d4909757757f27940369e1bdc67eebd52b87.tar.bz2 |
Various changes to make GCF nicer for the non-en-US world:
- Chrome Frame now uses MUI on Vista+ to detect IE's UX language.
- Chrome Frame now tells Chrome (via the --lang command-line option) what the current langauge is.
- Chrome Frame now respects Chrome's "ApplicationLocaleValue" group policy setting.
BUG=56435,59582
TEST=chrome_frame_unittests and chrome_frame_tests updated
Review URL: http://codereview.chromium.org/3757007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63208 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/policy_settings.h')
-rw-r--r-- | chrome_frame/policy_settings.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome_frame/policy_settings.h b/chrome_frame/policy_settings.h index f3eacac..28182bd 100644 --- a/chrome_frame/policy_settings.h +++ b/chrome_frame/policy_settings.h @@ -8,6 +8,8 @@ #include <string> #include <vector> +#include "base/basictypes.h" + // A simple class that reads and caches policy settings for Chrome Frame. // TODO(tommi): Support refreshing when new settings are pushed. // TODO(tommi): Use Chrome's classes for this (and the notification service). @@ -34,6 +36,19 @@ class PolicySettings { RendererForUrl GetRendererForContentType(const wchar_t* content_type); + // Returns the policy-configured Chrome app locale, or an empty string if none + // is configured. + const std::wstring& ApplicationLocale() const { + return application_locale_; + } + + // Helper functions for reading settings from the registry + static void ReadUrlSettings(RendererForUrl* default_renderer, + std::vector<std::wstring>* renderer_exclusion_list); + static void ReadContentTypeSetting( + std::vector<std::wstring>* content_type_list); + static void ReadApplicationLocaleSetting(std::wstring* application_locale); + protected: // Protected for now since the class is not thread safe. void RefreshFromRegistry(); @@ -42,6 +57,10 @@ class PolicySettings { RendererForUrl default_renderer_; std::vector<std::wstring> renderer_exclusion_list_; std::vector<std::wstring> content_type_list_; + std::wstring application_locale_; + + private: + DISALLOW_COPY_AND_ASSIGN(PolicySettings); }; |