| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_SYNC_ENGINE_TRAFFIC_RECORDER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_TRAFFIC_RECORDER_H_ |
| 6 #define CHROME_BROWSER_SYNC_ENGINE_TRAFFIC_RECORDER_H_ | 6 #define CHROME_BROWSER_SYNC_ENGINE_TRAFFIC_RECORDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/values.h" | 14 #include "base/values.h" |
| 15 #include "sync/protocol/sync.pb.h" | 15 #include "sync/protocol/sync.pb.h" |
| 16 | 16 |
| 17 namespace sync_pb { | 17 namespace sync_pb { |
| 18 class ClientToServerResponse; | 18 class ClientToServerResponse; |
| 19 class ClientToServerMessage; | 19 class ClientToServerMessage; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace csync { | 22 namespace syncer { |
| 23 | 23 |
| 24 class TrafficRecorder { | 24 class TrafficRecorder { |
| 25 public: | 25 public: |
| 26 enum TrafficMessageType { | 26 enum TrafficMessageType { |
| 27 CLIENT_TO_SERVER_MESSAGE, | 27 CLIENT_TO_SERVER_MESSAGE, |
| 28 CLIENT_TO_SERVER_RESPONSE, | 28 CLIENT_TO_SERVER_RESPONSE, |
| 29 UNKNOWN_MESSAGE_TYPE | 29 UNKNOWN_MESSAGE_TYPE |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 struct TrafficRecord { | 32 struct TrafficRecord { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 // Maximum number of messages stored in the queue. | 66 // Maximum number of messages stored in the queue. |
| 67 unsigned int max_messages_; | 67 unsigned int max_messages_; |
| 68 | 68 |
| 69 // Maximum size of each message. | 69 // Maximum size of each message. |
| 70 unsigned int max_message_size_; | 70 unsigned int max_message_size_; |
| 71 std::deque<TrafficRecord> records_; | 71 std::deque<TrafficRecord> records_; |
| 72 DISALLOW_COPY_AND_ASSIGN(TrafficRecorder); | 72 DISALLOW_COPY_AND_ASSIGN(TrafficRecorder); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace csync | 75 } // namespace syncer |
| 76 | 76 |
| 77 #endif // CHROME_BROWSER_SYNC_ENGINE_TRAFFIC_RECORDER_H_ | 77 #endif // CHROME_BROWSER_SYNC_ENGINE_TRAFFIC_RECORDER_H_ |
| 78 | 78 |
| OLD | NEW |