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

Unified Diff: chrome/browser/sync/notifier/sync_notifier_callback.h

Issue 6621062: Refactor sync notifier out of sync api. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 9 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/notifier/sync_notifier_callback.h
diff --git a/chrome/browser/sync/notifier/sync_notifier_callback.h b/chrome/browser/sync/notifier/sync_notifier_callback.h
new file mode 100644
index 0000000000000000000000000000000000000000..15c5925ce6a629140534185224a3e0fff6da75f1
--- /dev/null
+++ b/chrome/browser/sync/notifier/sync_notifier_callback.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+
+#ifndef CHROME_BROWSER_SYNC_NOTIFIER_SYNC_NOTIFIER_CALLBACK_H_
+#define CHROME_BROWSER_SYNC_NOTIFIER_SYNC_NOTIFIER_CALLBACK_H_
+
+#include "jingle/notifier/listener/notification_defines.h"
+
+namespace sync_notifier {
+
+struct NotificationData {
+ std::string service_url;
+ std::string service_specific_data;
+};
+
+class SyncNotifierCallback {
akalin 2011/03/08 02:48:30 I think it would be better to rename this SyncNoti
Agrawal 2011/03/09 01:57:04 Done.
+ public:
+ SyncNotifierCallback() {}
+ virtual ~SyncNotifierCallback() {}
+
+ virtual void OnIncomingNotification(
+ const IncomingNotificationData& notification_data) = 0;
akalin 2011/03/08 02:48:30 I think this should take a browser_sync::sessions:
Agrawal 2011/03/09 01:57:04 The data parsing also needs ModelSafeWorkerRegistr
+ virtual void OnNotificationStateChange(bool notifications_enabled) = 0;
+ virtual void OnOutgoingNotification() = 0;
akalin 2011/03/08 02:48:30 No need for an outgoing notification.
Agrawal 2011/03/09 01:57:04 SyncInternal::OnOutgoingNotification increments so
+ virtual void StoreCookie(const std::string& cookie) = 0;
akalin 2011/03/08 02:48:30 I don't think this should be part of the observer
Agrawal 2011/03/09 01:57:04 This is not clear to me. The state/cookie is curre
+};
+} // namespace sync_notifier
+#endif // CHROME_BROWSER_SYNC_NOTIFIER_SYNC_NOTIFIER_CALLBACK_H_

Powered by Google App Engine
This is Rietveld 408576698