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

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

Issue 10947046: Eliminate kAshNotifyDisabled and SystemNotification (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit Created 8 years, 3 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 | « chrome/browser/chromeos/locale_change_guard.h ('k') | chrome/browser/chromeos/login/login_utils.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.cc
diff --git a/chrome/browser/chromeos/locale_change_guard.cc b/chrome/browser/chromeos/locale_change_guard.cc
index fe076b4206ae1e97970f5d3b38ca481185a2f3c3..b0d4856e80a80f805db581afa00ace56795f39ef 100644
--- a/chrome/browser/chromeos/locale_change_guard.cc
+++ b/chrome/browser/chromeos/locale_change_guard.cc
@@ -4,11 +4,9 @@
#include "chrome/browser/chromeos/locale_change_guard.h"
-#include "ash/ash_switches.h"
#include "ash/shell.h"
#include "ash/system/tray/system_tray.h"
#include "base/bind.h"
-#include "base/command_line.h"
#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/browser_process.h"
@@ -57,7 +55,6 @@ class LocaleChangeGuard::Delegate : public NotificationDelegate {
LocaleChangeGuard::LocaleChangeGuard(Profile* profile)
: profile_(profile),
- note_(NULL),
reverted_(false) {
DCHECK(profile_);
registrar_.Add(this, chrome::NOTIFICATION_OWNERSHIP_STATUS_CHANGED,
@@ -137,11 +134,6 @@ void LocaleChangeGuard::Observe(int type,
}
void LocaleChangeGuard::Check() {
- if (note_ != NULL) {
- // Somehow we are invoked more than once. Once is enough.
- return;
- }
-
std::string cur_locale = g_browser_process->GetApplicationLocale();
if (cur_locale.empty()) {
NOTREACHED();
@@ -177,24 +169,8 @@ void LocaleChangeGuard::Check() {
PrepareChangingLocale(from_locale, to_locale);
}
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshNotifyDisabled)) {
- ash::Shell::GetInstance()->system_tray()->locale_observer()->
- OnLocaleChanged(this, cur_locale, from_locale_, to_locale_);
- return;
- }
-
- note_.reset(new chromeos::SystemNotification(
- profile_,
- new Delegate(this),
- IDR_NOTIFICATION_LOCALE_CHANGE,
- title_text_));
- note_->Show(
- message_text_, revert_link_text_,
- base::Bind(&LocaleChangeGuard::RevertLocaleChangeCallback,
- AsWeakPtr()),
- true, // urgent
- false); // non-sticky
+ ash::Shell::GetInstance()->system_tray()->locale_observer()->
+ OnLocaleChanged(this, cur_locale, from_locale_, to_locale_);
}
void LocaleChangeGuard::AcceptLocaleChange() {
« no previous file with comments | « chrome/browser/chromeos/locale_change_guard.h ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698