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

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

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
Index: chrome/browser/chromeos/locale_change_guard.cc
===================================================================
--- chrome/browser/chromeos/locale_change_guard.cc (revision 91971)
+++ chrome/browser/chromeos/locale_change_guard.cc (working copy)
@@ -12,6 +12,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
@@ -43,14 +44,14 @@
note_(NULL),
reverted_(false) {
DCHECK(profile_);
- registrar_.Add(this, NotificationType::OWNERSHIP_CHECKED,
+ registrar_.Add(this, chrome::NOTIFICATION_OWNERSHIP_CHECKED,
NotificationService::AllSources());
}
LocaleChangeGuard::~LocaleChangeGuard() {}
void LocaleChangeGuard::OnLogin() {
- registrar_.Add(this, NotificationType::LOAD_COMPLETED_MAIN_FRAME,
+ registrar_.Add(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
NotificationService::AllSources());
}
@@ -74,22 +75,22 @@
browser->ExecuteCommand(IDC_EXIT);
}
-void LocaleChangeGuard::Observe(NotificationType type,
+void LocaleChangeGuard::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
if (profile_ == NULL) {
NOTREACHED();
return;
}
- switch (type.value) {
- case NotificationType::LOAD_COMPLETED_MAIN_FRAME: {
+ switch (type) {
+ case content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME: {
// We need to perform locale change check only once, so unsubscribe.
- registrar_.Remove(this, NotificationType::LOAD_COMPLETED_MAIN_FRAME,
+ registrar_.Remove(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
NotificationService::AllSources());
Check();
break;
}
- case NotificationType::OWNERSHIP_CHECKED: {
+ case chrome::NOTIFICATION_OWNERSHIP_CHECKED: {
if (UserManager::Get()->current_user_is_owner()) {
PrefService* local_state = g_browser_process->local_state();
if (local_state) {
« no previous file with comments | « chrome/browser/chromeos/locale_change_guard.h ('k') | chrome/browser/chromeos/login/base_login_display_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698