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

Unified Diff: chrome/browser/chromeos/locale_change_guard.h

Issue 382973002: ChromeOS: should not show "Language changed" notification for certain languages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests build. Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/locale_change_guard.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/locale_change_guard.h
diff --git a/chrome/browser/chromeos/locale_change_guard.h b/chrome/browser/chromeos/locale_change_guard.h
index d2f525fff497919911524aad206944b03e8c405d..e18743475a6b3c686ea37fb18b3e78766ddcf69e 100644
--- a/chrome/browser/chromeos/locale_change_guard.h
+++ b/chrome/browser/chromeos/locale_change_guard.h
@@ -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_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/locale_change_guard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698