summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-03 21:27:06 +0000
committersanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-03 21:27:06 +0000
commit6e8c0827a59df4b52851735bcd2029b0d5fc04c2 (patch)
tree048a7e4cf15925d394f0ff1c3ce40466c4482446
parent446e16abd172481d860480ca40995edd4fa708e2 (diff)
downloadchromium_src-6e8c0827a59df4b52851735bcd2029b0d5fc04c2.zip
chromium_src-6e8c0827a59df4b52851735bcd2029b0d5fc04c2.tar.gz
chromium_src-6e8c0827a59df4b52851735bcd2029b0d5fc04c2.tar.bz2
Changed namespace of the TalkMediator and related classes from browser_sync to notifier.
BUG=None TEST=None, no functional change. Review URL: http://codereview.chromium.org/1869002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46276 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/sync/engine/all_status.cc18
-rw-r--r--chrome/browser/sync/engine/all_status.h11
-rw-r--r--chrome/browser/sync/engine/auth_watcher.cc2
-rw-r--r--chrome/browser/sync/engine/auth_watcher.h10
-rw-r--r--chrome/browser/sync/engine/auth_watcher_unittest.cc4
-rw-r--r--chrome/browser/sync/engine/syncapi.cc6
-rw-r--r--chrome/browser/sync/engine/syncer_thread.cc15
-rw-r--r--chrome/browser/sync/engine/syncer_thread.h9
-rw-r--r--chrome/browser/sync/notifier/listener/listen_task.cc4
-rw-r--r--chrome/browser/sync/notifier/listener/listen_task.h4
-rw-r--r--chrome/browser/sync/notifier/listener/mediator_thread.h4
-rw-r--r--chrome/browser/sync/notifier/listener/mediator_thread_impl.cc4
-rw-r--r--chrome/browser/sync/notifier/listener/mediator_thread_impl.h4
-rw-r--r--chrome/browser/sync/notifier/listener/mediator_thread_mock.h4
-rw-r--r--chrome/browser/sync/notifier/listener/notification_constants.cc4
-rw-r--r--chrome/browser/sync/notifier/listener/notification_constants.h4
-rw-r--r--chrome/browser/sync/notifier/listener/send_update_task.cc4
-rw-r--r--chrome/browser/sync/notifier/listener/send_update_task.h4
-rw-r--r--chrome/browser/sync/notifier/listener/send_update_task_unittest.cc4
-rw-r--r--chrome/browser/sync/notifier/listener/subscribe_task.cc4
-rw-r--r--chrome/browser/sync/notifier/listener/subscribe_task.h4
-rw-r--r--chrome/browser/sync/notifier/listener/subscribe_task_unittest.cc4
-rw-r--r--chrome/browser/sync/notifier/listener/talk_mediator.h4
-rw-r--r--chrome/browser/sync/notifier/listener/talk_mediator_impl.cc4
-rw-r--r--chrome/browser/sync/notifier/listener/talk_mediator_impl.h4
-rw-r--r--chrome/browser/sync/notifier/listener/talk_mediator_unittest.cc6
-rw-r--r--chrome/browser/sync/notifier/listener/xml_element_util.cc4
-rw-r--r--chrome/browser/sync/notifier/listener/xml_element_util.h4
-rw-r--r--chrome/browser/sync/notifier/listener/xml_element_util_unittest.cc4
-rw-r--r--chrome/browser/sync/tools/sync_listen_notifications.cc8
30 files changed, 90 insertions, 79 deletions
diff --git a/chrome/browser/sync/engine/all_status.cc b/chrome/browser/sync/engine/all_status.cc
index 42310d8..592de51 100644
--- a/chrome/browser/sync/engine/all_status.cc
+++ b/chrome/browser/sync/engine/all_status.cc
@@ -257,7 +257,7 @@ void AllStatus::HandleServerConnectionEvent(
}
}
-void AllStatus::WatchTalkMediator(const TalkMediator* mediator) {
+void AllStatus::WatchTalkMediator(const notifier::TalkMediator* mediator) {
status_.notifications_enabled = false;
talk_mediator_hookup_.reset(
NewEventListenerHookup(mediator->channel(), this,
@@ -265,24 +265,24 @@ void AllStatus::WatchTalkMediator(const TalkMediator* mediator) {
}
void AllStatus::HandleTalkMediatorEvent(
- const TalkMediatorEvent& event) {
+ const notifier::TalkMediatorEvent& event) {
ScopedStatusLockWithNotify lock(this);
switch (event.what_happened) {
- case TalkMediatorEvent::SUBSCRIPTIONS_ON:
+ case notifier::TalkMediatorEvent::SUBSCRIPTIONS_ON:
status_.notifications_enabled = true;
break;
- case TalkMediatorEvent::LOGOUT_SUCCEEDED:
- case TalkMediatorEvent::SUBSCRIPTIONS_OFF:
- case TalkMediatorEvent::TALKMEDIATOR_DESTROYED:
+ case notifier::TalkMediatorEvent::LOGOUT_SUCCEEDED:
+ case notifier::TalkMediatorEvent::SUBSCRIPTIONS_OFF:
+ case notifier::TalkMediatorEvent::TALKMEDIATOR_DESTROYED:
status_.notifications_enabled = false;
break;
- case TalkMediatorEvent::NOTIFICATION_RECEIVED:
+ case notifier::TalkMediatorEvent::NOTIFICATION_RECEIVED:
status_.notifications_received++;
break;
- case TalkMediatorEvent::NOTIFICATION_SENT:
+ case notifier::TalkMediatorEvent::NOTIFICATION_SENT:
status_.notifications_sent++;
break;
- case TalkMediatorEvent::LOGIN_SUCCEEDED:
+ case notifier::TalkMediatorEvent::LOGIN_SUCCEEDED:
default:
lock.set_notify_plan(DONT_NOTIFY);
break;
diff --git a/chrome/browser/sync/engine/all_status.h b/chrome/browser/sync/engine/all_status.h
index 6700314..3cd74cc 100644
--- a/chrome/browser/sync/engine/all_status.h
+++ b/chrome/browser/sync/engine/all_status.h
@@ -15,6 +15,11 @@
#include "base/scoped_ptr.h"
#include "chrome/common/deprecated/event_sys.h"
+namespace notifier {
+class TalkMediator;
+struct TalkMediatorEvent;
+}
+
namespace browser_sync {
class AuthWatcher;
@@ -23,13 +28,11 @@ class ScopedStatusLockWithNotify;
class ServerConnectionManager;
class Syncer;
class SyncerThread;
-class TalkMediator;
struct AllStatusEvent;
struct AuthWatcherEvent;
struct GaiaAuthEvent;
struct ServerConnectionEvent;
struct SyncerEvent;
-struct TalkMediatorEvent;
class AllStatus {
friend class ScopedStatusLockWithNotify;
@@ -113,9 +116,9 @@ class AllStatus {
void HandleSyncerEvent(const SyncerEvent& event);
void WatchTalkMediator(
- const browser_sync::TalkMediator* talk_mediator);
+ const notifier::TalkMediator* talk_mediator);
void HandleTalkMediatorEvent(
- const browser_sync::TalkMediatorEvent& event);
+ const notifier::TalkMediatorEvent& event);
// Returns a string description of the SyncStatus (currently just the ascii
// version of the enum). Will LOG(FATAL) if the status us out of range.
diff --git a/chrome/browser/sync/engine/auth_watcher.cc b/chrome/browser/sync/engine/auth_watcher.cc
index b8a06da..f347a37 100644
--- a/chrome/browser/sync/engine/auth_watcher.cc
+++ b/chrome/browser/sync/engine/auth_watcher.cc
@@ -46,7 +46,7 @@ AuthWatcher::AuthWatcher(DirectoryManager* dirman,
const string& gaia_url,
UserSettings* user_settings,
GaiaAuthenticator* gaia_auth,
- TalkMediator* talk_mediator)
+ notifier::TalkMediator* talk_mediator)
: gaia_(gaia_auth),
dirman_(dirman),
scm_(scm),
diff --git a/chrome/browser/sync/engine/auth_watcher.h b/chrome/browser/sync/engine/auth_watcher.h
index 925d7ca..149ade3 100644
--- a/chrome/browser/sync/engine/auth_watcher.h
+++ b/chrome/browser/sync/engine/auth_watcher.h
@@ -21,6 +21,10 @@
#include "chrome/common/deprecated/event_sys.h"
#include "testing/gtest/include/gtest/gtest_prod.h" // For FRIEND_TEST
+namespace notifier {
+class TalkMediator;
+}
+
namespace syncable {
struct DirectoryManagerEvent;
class DirectoryManager;
@@ -31,7 +35,6 @@ namespace browser_sync {
class AllStatus;
class AuthWatcher;
class ServerConnectionManager;
-class TalkMediator;
class URLFactory;
class UserSettings;
struct ServerConnectionEvent;
@@ -92,7 +95,7 @@ class AuthWatcher : public base::RefCountedThreadSafe<AuthWatcher> {
const std::string& gaia_url,
UserSettings* user_settings,
GaiaAuthenticator* gaia_auth,
- TalkMediator* talk_mediator);
+ notifier::TalkMediator* talk_mediator);
~AuthWatcher();
typedef EventChannel<AuthWatcherEvent, Lock> Channel;
@@ -209,7 +212,8 @@ class AuthWatcher : public base::RefCountedThreadSafe<AuthWatcher> {
AllStatus* const allstatus_;
Status status_;
UserSettings* const user_settings_;
- TalkMediator* talk_mediator_; // Interface to the notifications engine.
+ // Interface to the notifications engine.
+ notifier::TalkMediator* talk_mediator_;
scoped_ptr<Channel> channel_;
base::Thread auth_backend_thread_;
diff --git a/chrome/browser/sync/engine/auth_watcher_unittest.cc b/chrome/browser/sync/engine/auth_watcher_unittest.cc
index ee56525..b34efa3 100644
--- a/chrome/browser/sync/engine/auth_watcher_unittest.cc
+++ b/chrome/browser/sync/engine/auth_watcher_unittest.cc
@@ -98,7 +98,7 @@ class AuthWatcherTest : public testing::Test {
FilePath user_settings_path = temp_dir_.path().Append(kUserSettingsDB);
user_settings_->Init(user_settings_path);
gaia_auth_ = new GaiaAuthMockForAuthWatcher();
- talk_mediator_.reset(new TalkMediatorImpl(false));
+ talk_mediator_.reset(new notifier::TalkMediatorImpl(false));
auth_watcher_ = new AuthWatcher(metadb_.manager(), connection_.get(),
allstatus_.get(), kTestUserAgent, kTestServiceId, kTestGaiaURL,
user_settings_.get(), gaia_auth_, talk_mediator_.get());
@@ -148,7 +148,7 @@ class AuthWatcherTest : public testing::Test {
scoped_ptr<AllStatus> allstatus_;
scoped_ptr<UserSettings> user_settings_;
GaiaAuthMockForAuthWatcher* gaia_auth_; // Owned by auth_watcher_.
- scoped_ptr<TalkMediator> talk_mediator_;
+ scoped_ptr<notifier::TalkMediator> talk_mediator_;
scoped_refptr<AuthWatcher> auth_watcher_;
// This is used to block the AuthWatcherThread when it raises events until we
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc
index acf4474..070d22f 100644
--- a/chrome/browser/sync/engine/syncapi.cc
+++ b/chrome/browser/sync/engine/syncapi.cc
@@ -82,10 +82,10 @@ using browser_sync::Syncer;
using browser_sync::SyncerEvent;
using browser_sync::SyncerThread;
using browser_sync::UserSettings;
-using browser_sync::TalkMediator;
-using browser_sync::TalkMediatorImpl;
-using browser_sync::TalkMediatorEvent;
using browser_sync::sessions::SyncSessionContext;
+using notifier::TalkMediator;
+using notifier::TalkMediatorImpl;
+using notifier::TalkMediatorEvent;
using std::list;
using std::hex;
using std::string;
diff --git a/chrome/browser/sync/engine/syncer_thread.cc b/chrome/browser/sync/engine/syncer_thread.cc
index 458956f..8e0ab5f 100644
--- a/chrome/browser/sync/engine/syncer_thread.cc
+++ b/chrome/browser/sync/engine/syncer_thread.cc
@@ -602,7 +602,7 @@ void SyncerThread::NudgeSyncImpl(int milliseconds_from_now,
vault_field_changed_.Broadcast();
}
-void SyncerThread::WatchTalkMediator(TalkMediator* mediator) {
+void SyncerThread::WatchTalkMediator(notifier::TalkMediator* mediator) {
talk_mediator_hookup_.reset(
NewEventListenerHookup(
mediator->channel(),
@@ -610,18 +610,19 @@ void SyncerThread::WatchTalkMediator(TalkMediator* mediator) {
&SyncerThread::HandleTalkMediatorEvent));
}
-void SyncerThread::HandleTalkMediatorEvent(const TalkMediatorEvent& event) {
+void SyncerThread::HandleTalkMediatorEvent(
+ const notifier::TalkMediatorEvent& event) {
AutoLock lock(lock_);
switch (event.what_happened) {
- case TalkMediatorEvent::LOGIN_SUCCEEDED:
+ case notifier::TalkMediatorEvent::LOGIN_SUCCEEDED:
LOG(INFO) << "P2P: Login succeeded.";
p2p_authenticated_ = true;
break;
- case TalkMediatorEvent::LOGOUT_SUCCEEDED:
+ case notifier::TalkMediatorEvent::LOGOUT_SUCCEEDED:
LOG(INFO) << "P2P: Login succeeded.";
p2p_authenticated_ = false;
break;
- case TalkMediatorEvent::SUBSCRIPTIONS_ON:
+ case notifier::TalkMediatorEvent::SUBSCRIPTIONS_ON:
LOG(INFO) << "P2P: Subscriptions successfully enabled.";
p2p_subscribed_ = true;
if (NULL != vault_.syncer_) {
@@ -629,11 +630,11 @@ void SyncerThread::HandleTalkMediatorEvent(const TalkMediatorEvent& event) {
NudgeSyncImpl(0, kLocal);
}
break;
- case TalkMediatorEvent::SUBSCRIPTIONS_OFF:
+ case notifier::TalkMediatorEvent::SUBSCRIPTIONS_OFF:
LOG(INFO) << "P2P: Subscriptions are not enabled.";
p2p_subscribed_ = false;
break;
- case TalkMediatorEvent::NOTIFICATION_RECEIVED:
+ case notifier::TalkMediatorEvent::NOTIFICATION_RECEIVED:
// Check if the service url is a sync URL. An empty service URL
// is treated as a legacy sync notification
if (event.notification_data.service_url.empty() ||
diff --git a/chrome/browser/sync/engine/syncer_thread.h b/chrome/browser/sync/engine/syncer_thread.h
index dc5cdf2..ac1ea7b 100644
--- a/chrome/browser/sync/engine/syncer_thread.h
+++ b/chrome/browser/sync/engine/syncer_thread.h
@@ -30,6 +30,10 @@
class EventListenerHookup;
+namespace notifier {
+class TalkMediator;
+}
+
namespace syncable {
class DirectoryManager;
struct DirectoryManagerEvent;
@@ -40,7 +44,6 @@ namespace browser_sync {
class ModelSafeWorker;
class ServerConnectionManager;
class Syncer;
-class TalkMediator;
class URLFactory;
struct ServerConnectionEvent;
struct SyncerEvent;
@@ -132,7 +135,7 @@ class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>,
virtual void NudgeSyncer(int milliseconds_from_now, NudgeSource source);
// Registers this thread to watch talk mediator events.
- virtual void WatchTalkMediator(TalkMediator* talk_mediator);
+ virtual void WatchTalkMediator(notifier::TalkMediator* talk_mediator);
virtual SyncerEventChannel* relay_channel();
@@ -235,7 +238,7 @@ class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>,
void HandleServerConnectionEvent(const ServerConnectionEvent& event);
- void HandleTalkMediatorEvent(const TalkMediatorEvent& event);
+ void HandleTalkMediatorEvent(const notifier::TalkMediatorEvent& event);
void SyncMain(Syncer* syncer);
diff --git a/chrome/browser/sync/notifier/listener/listen_task.cc b/chrome/browser/sync/notifier/listener/listen_task.cc
index e0f0a814..8c9b949 100644
--- a/chrome/browser/sync/notifier/listener/listen_task.cc
+++ b/chrome/browser/sync/notifier/listener/listen_task.cc
@@ -14,7 +14,7 @@
#include "talk/xmpp/xmppconstants.h"
#include "talk/xmpp/xmppengine.h"
-namespace browser_sync {
+namespace notifier {
ListenTask::ListenTask(Task* parent)
: buzz::XmppTask(parent, buzz::XmppEngine::HL_TYPE) {
@@ -141,4 +141,4 @@ bool ListenTask::IsValidNotification(const buzz::XmlElement* stanza) {
(stanza->Attr(buzz::QN_FROM) == GetClient()->jid().BareJid().Str()));
}
-} // namespace browser_sync
+} // namespace notifier
diff --git a/chrome/browser/sync/notifier/listener/listen_task.h b/chrome/browser/sync/notifier/listener/listen_task.h
index 1ac575b..b01dd80 100644
--- a/chrome/browser/sync/notifier/listener/listen_task.h
+++ b/chrome/browser/sync/notifier/listener/listen_task.h
@@ -20,7 +20,7 @@ class XmlElement;
class Jid;
}
-namespace browser_sync {
+namespace notifier {
class ListenTask : public buzz::XmppTask {
public:
@@ -44,6 +44,6 @@ class ListenTask : public buzz::XmppTask {
DISALLOW_COPY_AND_ASSIGN(ListenTask);
};
-} // namespace browser_sync
+} // namespace notifier
#endif // CHROME_BROWSER_SYNC_NOTIFIER_LISTENER_LISTEN_TASK_H_
diff --git a/chrome/browser/sync/notifier/listener/mediator_thread.h b/chrome/browser/sync/notifier/listener/mediator_thread.h
index 8ff2cf7e..9e3b33a 100644
--- a/chrome/browser/sync/notifier/listener/mediator_thread.h
+++ b/chrome/browser/sync/notifier/listener/mediator_thread.h
@@ -16,7 +16,7 @@
#include "talk/base/sigslot.h"
#include "talk/xmpp/xmppclientsettings.h"
-namespace browser_sync {
+namespace notifier {
class MediatorThread {
public:
@@ -50,6 +50,6 @@ class MediatorThread {
DISALLOW_COPY_AND_ASSIGN(MediatorThread);
};
-} // namespace browser_sync
+} // namespace notifier
#endif // CHROME_BROWSER_SYNC_NOTIFIER_LISTENER_MEDIATOR_THREAD_H_
diff --git a/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc b/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc
index adbf0e0..ad5d47e 100644
--- a/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc
+++ b/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc
@@ -21,7 +21,7 @@
using std::string;
-namespace browser_sync {
+namespace notifier {
MediatorThreadImpl::MediatorThreadImpl() {}
@@ -295,4 +295,4 @@ buzz::XmppClient* MediatorThreadImpl::xmpp_client() {
return login_->xmpp_client();
}
-} // namespace browser_sync
+} // namespace notifier
diff --git a/chrome/browser/sync/notifier/listener/mediator_thread_impl.h b/chrome/browser/sync/notifier/listener/mediator_thread_impl.h
index 8455009..6d14241 100644
--- a/chrome/browser/sync/notifier/listener/mediator_thread_impl.h
+++ b/chrome/browser/sync/notifier/listener/mediator_thread_impl.h
@@ -44,7 +44,7 @@ namespace talk_base {
class SocketServer;
} // namespace talk_base
-namespace browser_sync {
+namespace notifier {
enum MEDIATOR_CMD {
CMD_LOGIN,
@@ -147,6 +147,6 @@ class MediatorThreadImpl
DISALLOW_COPY_AND_ASSIGN(MediatorThreadImpl);
};
-} // namespace browser_sync
+} // namespace notifier
#endif // CHROME_BROWSER_SYNC_NOTIFIER_LISTENER_MEDIATOR_THREAD_IMPL_H_
diff --git a/chrome/browser/sync/notifier/listener/mediator_thread_mock.h b/chrome/browser/sync/notifier/listener/mediator_thread_mock.h
index 7a8b0f2..3257563 100644
--- a/chrome/browser/sync/notifier/listener/mediator_thread_mock.h
+++ b/chrome/browser/sync/notifier/listener/mediator_thread_mock.h
@@ -16,7 +16,7 @@
#include "chrome/browser/sync/notification_method.h"
#include "talk/xmpp/xmppclientsettings.h"
-namespace browser_sync {
+namespace notifier {
class MockMediatorThread : public MediatorThread {
public:
@@ -77,6 +77,6 @@ class MockMediatorThread : public MediatorThread {
int send_calls;
};
-} // namespace browser_sync
+} // namespace notifier
#endif // CHROME_BROWSER_SYNC_NOTIFIER_LISTENER_MEDIATOR_THREAD_MOCK_H_
diff --git a/chrome/browser/sync/notifier/listener/notification_constants.cc b/chrome/browser/sync/notifier/listener/notification_constants.cc
index aa21640..fe1bbe1 100644
--- a/chrome/browser/sync/notifier/listener/notification_constants.cc
+++ b/chrome/browser/sync/notifier/listener/notification_constants.cc
@@ -4,8 +4,8 @@
#include "chrome/browser/sync/notifier/listener/notification_constants.h"
-namespace browser_sync {
+namespace notifier {
const char kNotifierNamespace[] = "google:notifier";
-} // namespace browser_sync
+} // namespace notifier
diff --git a/chrome/browser/sync/notifier/listener/notification_constants.h b/chrome/browser/sync/notifier/listener/notification_constants.h
index e365e16..1d5be72 100644
--- a/chrome/browser/sync/notifier/listener/notification_constants.h
+++ b/chrome/browser/sync/notifier/listener/notification_constants.h
@@ -5,10 +5,10 @@
#ifndef CHROME_BROWSER_SYNC_NOTIFIER_LISTENER_NOTIFICATION_CONSTANTS_H_
#define CHROME_BROWSER_SYNC_NOTIFIER_LISTENER_NOTIFICATION_CONSTANTS_H_
-namespace browser_sync {
+namespace notifier {
extern const char kNotifierNamespace[];
-} // namespace browser_sync
+} // namespace notifier
#endif // CHROME_BROWSER_SYNC_NOTIFIER_LISTENER_NOTIFICATION_CONSTANTS_H_
diff --git a/chrome/browser/sync/notifier/listener/send_update_task.cc b/chrome/browser/sync/notifier/listener/send_update_task.cc
index b97b965..deddc56 100644
--- a/chrome/browser/sync/notifier/listener/send_update_task.cc
+++ b/chrome/browser/sync/notifier/listener/send_update_task.cc
@@ -14,7 +14,7 @@
#include "talk/xmpp/xmppclient.h"
#include "talk/xmpp/xmppconstants.h"
-namespace browser_sync {
+namespace notifier {
SendUpdateTask::SendUpdateTask(Task* parent,
const OutgoingNotificationData& data)
@@ -128,4 +128,4 @@ buzz::XmlElement* SendUpdateTask::MakeUpdateMessage(
return iq;
}
-} // namespace browser_sync
+} // namespace notifier
diff --git a/chrome/browser/sync/notifier/listener/send_update_task.h b/chrome/browser/sync/notifier/listener/send_update_task.h
index 2cf8fbd..5c5491a 100644
--- a/chrome/browser/sync/notifier/listener/send_update_task.h
+++ b/chrome/browser/sync/notifier/listener/send_update_task.h
@@ -14,7 +14,7 @@
#include "talk/xmpp/xmpptask.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
-namespace browser_sync {
+namespace notifier {
class SendUpdateTask : public buzz::XmppTask {
public:
@@ -42,6 +42,6 @@ class SendUpdateTask : public buzz::XmppTask {
DISALLOW_COPY_AND_ASSIGN(SendUpdateTask);
};
-} // namespace browser_sync
+} // namespace notifier
#endif // CHROME_BROWSER_SYNC_NOTIFIER_LISTENER_SEND_UPDATE_TASK_H_
diff --git a/chrome/browser/sync/notifier/listener/send_update_task_unittest.cc b/chrome/browser/sync/notifier/listener/send_update_task_unittest.cc
index 0d06a3d..8b69210 100644
--- a/chrome/browser/sync/notifier/listener/send_update_task_unittest.cc
+++ b/chrome/browser/sync/notifier/listener/send_update_task_unittest.cc
@@ -15,7 +15,7 @@ namespace buzz {
class XmlElement;
}
-namespace browser_sync {
+namespace notifier {
class SendUpdateTaskTest : public testing::Test {
public:
@@ -113,4 +113,4 @@ TEST_F(SendUpdateTaskTest, MakeUpdateMessage) {
EXPECT_EQ(expected_xml_string, XmlElementToString(*message_with_data));
}
-} // namespace browser_sync
+} // namespace notifier
diff --git a/chrome/browser/sync/notifier/listener/subscribe_task.cc b/chrome/browser/sync/notifier/listener/subscribe_task.cc
index 332513c..31bca4f0 100644
--- a/chrome/browser/sync/notifier/listener/subscribe_task.cc
+++ b/chrome/browser/sync/notifier/listener/subscribe_task.cc
@@ -16,7 +16,7 @@
#include "talk/xmpp/xmppconstants.h"
#include "talk/xmpp/xmppengine.h"
-namespace browser_sync {
+namespace notifier {
SubscribeTask::SubscribeTask(
Task* parent,
@@ -106,4 +106,4 @@ buzz::XmlElement* SubscribeTask::MakeSubscriptionMessage(
return iq;
}
-} // namespace browser_sync
+} // namespace notifier
diff --git a/chrome/browser/sync/notifier/listener/subscribe_task.h b/chrome/browser/sync/notifier/listener/subscribe_task.h
index 15dd134..9fb3919 100644
--- a/chrome/browser/sync/notifier/listener/subscribe_task.h
+++ b/chrome/browser/sync/notifier/listener/subscribe_task.h
@@ -16,7 +16,7 @@
#include "talk/xmpp/xmpptask.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
-namespace browser_sync {
+namespace notifier {
// TODO(akalin): Remove NOTIFICATION_LEGACY and remove/refactor relevant code
// in this class and any other class that uses notification_method.
class SubscribeTask : public buzz::XmppTask {
@@ -46,6 +46,6 @@ class SubscribeTask : public buzz::XmppTask {
DISALLOW_COPY_AND_ASSIGN(SubscribeTask);
};
-} // namespace browser_sync
+} // namespace notifier
#endif // CHROME_BROWSER_SYNC_NOTIFIER_LISTENER_SUBSCRIBE_TASK_H_
diff --git a/chrome/browser/sync/notifier/listener/subscribe_task_unittest.cc b/chrome/browser/sync/notifier/listener/subscribe_task_unittest.cc
index 800b57d..8c94ced 100644
--- a/chrome/browser/sync/notifier/listener/subscribe_task_unittest.cc
+++ b/chrome/browser/sync/notifier/listener/subscribe_task_unittest.cc
@@ -16,7 +16,7 @@ namespace buzz {
class XmlElement;
}
-namespace browser_sync {
+namespace notifier {
class SubscribeTaskTest : public testing::Test {
public:
@@ -71,4 +71,4 @@ TEST_F(SubscribeTaskTest, MakeSubscriptionMessage) {
EXPECT_EQ(expected_xml_string, XmlElementToString(*message_with_services));
}
-} // namespace browser_sync
+} // namespace notifier
diff --git a/chrome/browser/sync/notifier/listener/talk_mediator.h b/chrome/browser/sync/notifier/listener/talk_mediator.h
index a898113..3f0853d 100644
--- a/chrome/browser/sync/notifier/listener/talk_mediator.h
+++ b/chrome/browser/sync/notifier/listener/talk_mediator.h
@@ -21,7 +21,7 @@
#include "chrome/browser/sync/notifier/listener/notification_defines.h"
#include "chrome/common/deprecated/event_sys.h"
-namespace browser_sync {
+namespace notifier {
struct TalkMediatorEvent {
enum WhatHappened {
@@ -71,6 +71,6 @@ class TalkMediator {
virtual void AddSubscribedServiceUrl(const std::string& service_url) = 0;
};
-} // namespace browser_sync
+} // namespace notifier
#endif // CHROME_BROWSER_SYNC_NOTIFIER_LISTENER_TALK_MEDIATOR_H_
diff --git a/chrome/browser/sync/notifier/listener/talk_mediator_impl.cc b/chrome/browser/sync/notifier/listener/talk_mediator_impl.cc
index 7e5fc22..eeccfc1 100644
--- a/chrome/browser/sync/notifier/listener/talk_mediator_impl.cc
+++ b/chrome/browser/sync/notifier/listener/talk_mediator_impl.cc
@@ -13,7 +13,7 @@
#include "talk/xmpp/xmppclientsettings.h"
#include "talk/xmpp/xmppengine.h"
-namespace browser_sync {
+namespace notifier {
// Before any authorization event from TalkMediatorImpl, we need to initialize
// the SSL library.
@@ -254,4 +254,4 @@ void TalkMediatorImpl::OnNotificationSent() {
channel_->NotifyListeners(event);
}
-} // namespace browser_sync
+} // namespace notifier
diff --git a/chrome/browser/sync/notifier/listener/talk_mediator_impl.h b/chrome/browser/sync/notifier/listener/talk_mediator_impl.h
index 8488b5f..e304ea3 100644
--- a/chrome/browser/sync/notifier/listener/talk_mediator_impl.h
+++ b/chrome/browser/sync/notifier/listener/talk_mediator_impl.h
@@ -22,7 +22,7 @@
class EventListenerHookup;
-namespace browser_sync {
+namespace notifier {
class TalkMediatorImpl
: public TalkMediator,
@@ -110,6 +110,6 @@ class TalkMediatorImpl
DISALLOW_COPY_AND_ASSIGN(TalkMediatorImpl);
};
-} // namespace browser_sync
+} // namespace notifier
#endif // CHROME_BROWSER_SYNC_NOTIFIER_LISTENER_TALK_MEDIATOR_IMPL_H_
diff --git a/chrome/browser/sync/notifier/listener/talk_mediator_unittest.cc b/chrome/browser/sync/notifier/listener/talk_mediator_unittest.cc
index 7e4c0d6..bca9d19 100644
--- a/chrome/browser/sync/notifier/listener/talk_mediator_unittest.cc
+++ b/chrome/browser/sync/notifier/listener/talk_mediator_unittest.cc
@@ -11,12 +11,12 @@
#include "talk/xmpp/xmppengine.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace browser_sync {
+namespace notifier {
class TalkMediatorImplTest : public testing::Test {
public:
void HandleTalkMediatorEvent(
- const browser_sync::TalkMediatorEvent& event) {
+ const notifier::TalkMediatorEvent& event) {
last_message_ = event.what_happened;
}
@@ -182,4 +182,4 @@ TEST_F(TalkMediatorImplTest, MediatorThreadCallbacks) {
ASSERT_TRUE(last_message_ == TalkMediatorEvent::TALKMEDIATOR_DESTROYED);
}
-} // namespace browser_sync
+} // namespace notifier
diff --git a/chrome/browser/sync/notifier/listener/xml_element_util.cc b/chrome/browser/sync/notifier/listener/xml_element_util.cc
index a00f899..90bcb89 100644
--- a/chrome/browser/sync/notifier/listener/xml_element_util.cc
+++ b/chrome/browser/sync/notifier/listener/xml_element_util.cc
@@ -13,7 +13,7 @@
#include "talk/xmllite/xmlelement.h"
#include "talk/xmllite/xmlprinter.h"
-namespace browser_sync {
+namespace notifier {
std::string XmlElementToString(const buzz::XmlElement& xml_element) {
std::ostringstream xml_stream;
@@ -48,4 +48,4 @@ buzz::XmlElement* MakeStringXmlElement(const char* name, const char* value) {
return data_xml_element;
}
-} // namespace browser_sync
+} // namespace notifier
diff --git a/chrome/browser/sync/notifier/listener/xml_element_util.h b/chrome/browser/sync/notifier/listener/xml_element_util.h
index cfd0d05..5058dab 100644
--- a/chrome/browser/sync/notifier/listener/xml_element_util.h
+++ b/chrome/browser/sync/notifier/listener/xml_element_util.h
@@ -11,7 +11,7 @@ namespace buzz {
class XmlElement;
}
-namespace browser_sync {
+namespace notifier {
std::string XmlElementToString(const buzz::XmlElement& xml_element);
@@ -24,6 +24,6 @@ buzz::XmlElement* MakeIntXmlElement(const char* name, int value);
buzz::XmlElement* MakeStringXmlElement(const char* name, const char* value);
-} // namespace browser_sync
+} // namespace notifier
#endif // CHROME_BROWSER_SYNC_NOTIFIER_LISTENER_XML_ELEMENT_UTIL_H_
diff --git a/chrome/browser/sync/notifier/listener/xml_element_util_unittest.cc b/chrome/browser/sync/notifier/listener/xml_element_util_unittest.cc
index 7faf073..19d6ad6 100644
--- a/chrome/browser/sync/notifier/listener/xml_element_util_unittest.cc
+++ b/chrome/browser/sync/notifier/listener/xml_element_util_unittest.cc
@@ -18,7 +18,7 @@ namespace buzz {
class XmlElement;
}
-namespace browser_sync {
+namespace notifier {
namespace {
class XmlElementUtilTest : public testing::Test {};
@@ -56,4 +56,4 @@ TEST_F(XmlElementUtilTest, MakeStringXmlElement) {
}
} // namespace
-} // namespace browser_sync
+} // namespace notifier
diff --git a/chrome/browser/sync/tools/sync_listen_notifications.cc b/chrome/browser/sync/tools/sync_listen_notifications.cc
index dea8471..1b1f1b1 100644
--- a/chrome/browser/sync/tools/sync_listen_notifications.cc
+++ b/chrome/browser/sync/tools/sync_listen_notifications.cc
@@ -96,13 +96,13 @@ class XmppNotificationClient : public sigslot::has_slots<> {
subscribed_services_list.push_back(browser_sync::kSyncServiceUrl);
}
// Owned by task_pump_.
- browser_sync::SubscribeTask* subscribe_task =
- new browser_sync::SubscribeTask(xmpp_client_,
+ notifier::SubscribeTask* subscribe_task =
+ new notifier::SubscribeTask(xmpp_client_,
subscribed_services_list);
subscribe_task->Start();
// Owned by task_pump_.
- browser_sync::ListenTask* listen_task =
- new browser_sync::ListenTask(xmpp_client_);
+ notifier::ListenTask* listen_task =
+ new notifier::ListenTask(xmpp_client_);
listen_task->Start();
break;
}