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

Unified Diff: chrome/browser/sync/glue/extension_change_processor.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/sync/glue/extension_change_processor.cc
===================================================================
--- chrome/browser/sync/glue/extension_change_processor.cc (revision 91968)
+++ chrome/browser/sync/glue/extension_change_processor.cc (working copy)
@@ -14,6 +14,7 @@
#include "chrome/browser/sync/glue/extension_sync.h"
#include "chrome/browser/sync/glue/extension_util.h"
#include "chrome/browser/sync/protocol/extension_specifics.pb.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_details.h"
@@ -39,24 +40,24 @@
// the browser or the syncapi are done in order; this is tricky since
// some events (e.g., extension installation) are done asynchronously.
-void ExtensionChangeProcessor::Observe(NotificationType type,
+void ExtensionChangeProcessor::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(running());
DCHECK(profile_);
- if ((type != NotificationType::EXTENSION_LOADED) &&
- (type != NotificationType::EXTENSION_UPDATE_DISABLED) &&
- (type != NotificationType::EXTENSION_UNLOADED)) {
+ if ((type != chrome::NOTIFICATION_EXTENSION_LOADED) &&
+ (type != chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED) &&
+ (type != chrome::NOTIFICATION_EXTENSION_UNLOADED)) {
LOG(DFATAL) << "Received unexpected notification of type "
- << type.value;
+ << type;
return;
}
// Filter out unhandled extensions first.
DCHECK_EQ(Source<Profile>(source).ptr(), profile_);
const Extension& extension =
- (type == NotificationType::EXTENSION_UNLOADED) ?
+ (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) ?
*Details<UnloadedExtensionInfo>(details)->extension :
*Details<const Extension>(details).ptr();
if (!traits_.is_valid_and_syncable(extension)) {
@@ -66,7 +67,7 @@
const std::string& id = extension.id();
// Then handle extension uninstalls.
- if (type == NotificationType::EXTENSION_UNLOADED) {
+ if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) {
const UnloadedExtensionInfo& info =
*Details<UnloadedExtensionInfo>(details).ptr();
if (info.reason == UnloadedExtensionInfo::UNINSTALL) {
@@ -78,7 +79,7 @@
}
VLOG(1) << "Updating server data for extension " << id
- << " (notification type = " << type.value << ")";
+ << " (notification type = " << type << ")";
std::string error;
if (!UpdateServerData(traits_, extension, *extension_service_,
share_handle(), &error)) {
@@ -163,16 +164,16 @@
DCHECK(profile_);
notification_registrar_.Add(
- this, NotificationType::EXTENSION_LOADED,
+ this, chrome::NOTIFICATION_EXTENSION_LOADED,
Source<Profile>(profile_));
// Despite the name, this notification is exactly like
// EXTENSION_LOADED but with an initial state of DISABLED.
notification_registrar_.Add(
- this, NotificationType::EXTENSION_UPDATE_DISABLED,
+ this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
Source<Profile>(profile_));
notification_registrar_.Add(
- this, NotificationType::EXTENSION_UNLOADED,
+ this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
Source<Profile>(profile_));
}
« no previous file with comments | « chrome/browser/sync/glue/extension_change_processor.h ('k') | chrome/browser/sync/glue/password_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698