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

Side by Side Diff: chrome/browser/sync/notifier/p2p_notifier.h

Issue 7753023: [Sync] Add tests for migration triggered by notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // A notifier that uses p2p notifications based on XMPP push 5 // A notifier that uses p2p notifications based on XMPP push
6 // notifications. Used only for sync integration tests. 6 // notifications. Used only for sync integration tests.
7 7
8 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_P2P_NOTIFIER_H_ 8 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_P2P_NOTIFIER_H_
9 #define CHROME_BROWSER_SYNC_NOTIFIER_P2P_NOTIFIER_H_ 9 #define CHROME_BROWSER_SYNC_NOTIFIER_P2P_NOTIFIER_H_
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/observer_list.h" 16 #include "base/observer_list.h"
17 #include "chrome/browser/sync/notifier/sync_notifier.h" 17 #include "chrome/browser/sync/notifier/sync_notifier.h"
18 #include "chrome/browser/sync/syncable/model_type.h" 18 #include "chrome/browser/sync/syncable/model_type.h"
19 #include "jingle/notifier/listener/talk_mediator.h" 19 #include "jingle/notifier/listener/talk_mediator.h"
20 20
21 namespace base { 21 namespace base {
22 class MessageLoopProxy; 22 class MessageLoopProxy;
23 } 23 }
24 24
25 25
26 namespace sync_notifier { 26 namespace sync_notifier {
27 27
28 // The channel to use for sync notifications.
29 extern const char* kSyncP2PNotificationChannel;
30
28 // The intended recipient(s) of a P2P notification. 31 // The intended recipient(s) of a P2P notification.
29 enum P2PNotificationTarget { 32 enum P2PNotificationTarget {
30 NOTIFY_SELF, 33 NOTIFY_SELF,
31 FIRST_NOTIFICATION_TARGET = NOTIFY_SELF, 34 FIRST_NOTIFICATION_TARGET = NOTIFY_SELF,
32 NOTIFY_OTHERS, 35 NOTIFY_OTHERS,
33 NOTIFY_ALL, 36 NOTIFY_ALL,
34 LAST_NOTIFICATION_TARGET = NOTIFY_ALL 37 LAST_NOTIFICATION_TARGET = NOTIFY_ALL
35 }; 38 };
36 39
37 std::string P2PNotificationTargetToString( 40 std::string P2PNotificationTargetToString(
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Whether |talk_mediator_| has notified us that notifications are 125 // Whether |talk_mediator_| has notified us that notifications are
123 // enabled. 126 // enabled.
124 bool notifications_enabled_; 127 bool notifications_enabled_;
125 128
126 syncable::ModelTypeSet enabled_types_; 129 syncable::ModelTypeSet enabled_types_;
127 scoped_refptr<base::MessageLoopProxy> parent_message_loop_proxy_; 130 scoped_refptr<base::MessageLoopProxy> parent_message_loop_proxy_;
128 }; 131 };
129 132
130 } // namespace sync_notifier 133 } // namespace sync_notifier
131 #endif // CHROME_BROWSER_SYNC_NOTIFIER_P2P_NOTIFIER_H_ 134 #endif // CHROME_BROWSER_SYNC_NOTIFIER_P2P_NOTIFIER_H_
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/sync/notifier/p2p_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698