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

Side by Side Diff: chrome/browser/sync/notifier/communicator/xmpp_log.h

Issue 1956001: Moved XMPP notifier library from chrome/browser/sync to chrome/common.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_COMMUNICATOR_XMPP_LOG_H_
6 #define CHROME_BROWSER_SYNC_NOTIFIER_COMMUNICATOR_XMPP_LOG_H_
7
8 #if LOGGING
9
10 #include <vector>
11
12 #include "talk/base/basictypes.h"
13 #include "talk/base/sigslot.h"
14
15 namespace notifier {
16
17 // Log the xmpp input and output.
18 class XmppLog : public sigslot::has_slots<> {
19 public:
20 XmppLog() : censor_password_(false) {
21 }
22
23 void Input(const char* data, int len) {
24 xmpp_input_buffer_.insert(xmpp_input_buffer_.end(), data, data + len);
25 XmppPrint(false);
26 }
27
28 void Output(const char* data, int len) {
29 xmpp_output_buffer_.insert(xmpp_output_buffer_.end(), data, data + len);
30 XmppPrint(true);
31 }
32
33 private:
34 void XmppPrint(bool output);
35
36 std::vector<char> xmpp_input_buffer_;
37 std::vector<char> xmpp_output_buffer_;
38 bool censor_password_;
39 DISALLOW_COPY_AND_ASSIGN(XmppLog);
40 };
41
42 } // namespace notifier
43
44 #endif // if LOGGING
45
46 #endif // CHROME_BROWSER_SYNC_NOTIFIER_COMMUNICATOR_XMPP_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698