Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / locale_change_guard.h
index d2f525f..e187434 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "ash/system/locale/locale_observer.h"
 #include "base/compiler_specific.h"
+#include "base/gtest_prod_util.h"
 #include "base/lazy_instance.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
@@ -47,6 +48,11 @@ class LocaleChangeGuard : public content::NotificationObserver,
   void OnLogin();
 
  private:
+  FRIEND_TEST_ALL_PREFIXES(LocaleChangeGuardTest,
+                           ShowNotificationLocaleChanged);
+  FRIEND_TEST_ALL_PREFIXES(LocaleChangeGuardTest,
+                           ShowNotificationLocaleChangedList);
+
   void RevertLocaleChangeCallback(const base::ListValue* list);
   void Check();
 
@@ -55,6 +61,13 @@ class LocaleChangeGuard : public content::NotificationObserver,
                        const content::NotificationSource& source,
                        const content::NotificationDetails& details) OVERRIDE;
 
+  // Returns true if we should notify user about automatic locale change.
+  static bool ShouldShowLocaleChangeNotification(const std::string& from_locale,
+                                                 const std::string& to_locale);
+
+  static const char* const* GetSkipShowNotificationLanguagesForTesting();
+  static size_t GetSkipShowNotificationLanguagesSizeForTesting();
+
   std::string from_locale_;
   std::string to_locale_;
   Profile* profile_;