diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-14 01:35:27 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-14 01:35:27 +0000 |
commit | a16ed65e3c9cd0a920692d6695b5be70ccea9c93 (patch) | |
tree | 96dd6a0224e92b76c9b0a662835ae4d08bb50985 /chrome/common/ipc_test_sink.cc | |
parent | 5a82010ab774e803a0a69328fdf56a37dee91e86 (diff) | |
download | chromium_src-a16ed65e3c9cd0a920692d6695b5be70ccea9c93.zip chromium_src-a16ed65e3c9cd0a920692d6695b5be70ccea9c93.tar.gz chromium_src-a16ed65e3c9cd0a920692d6695b5be70ccea9c93.tar.bz2 |
NO CODE CHANGE.
Fix EOL-style on a few files.
Review URL: http://codereview.chromium.org/21373
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9813 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/ipc_test_sink.cc')
-rw-r--r-- | chrome/common/ipc_test_sink.cc | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/chrome/common/ipc_test_sink.cc b/chrome/common/ipc_test_sink.cc index 7a461b6..c278902 100644 --- a/chrome/common/ipc_test_sink.cc +++ b/chrome/common/ipc_test_sink.cc @@ -1,51 +1,51 @@ -// Copyright (c) 2009 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.
-
-#include "chrome/common/ipc_test_sink.h"
-
-namespace IPC {
-
-TestSink::TestSink() {
-}
-
-TestSink::~TestSink() {
-}
-
-void TestSink::OnMessageReceived(const Message& msg) {
- messages_.push_back(Message(msg));
-}
-
-void TestSink::ClearMessages() {
- messages_.clear();
-}
-
-const Message* TestSink::GetMessageAt(size_t index) const {
- if (index >= messages_.size())
- return NULL;
- return &messages_[index];
-}
-
-const Message* TestSink::GetFirstMessageMatching(uint16 id) const {
- for (size_t i = 0; i < messages_.size(); i++) {
- if (messages_[i].type() == id)
- return &messages_[i];
- }
- return NULL;
-}
-
-const Message* TestSink::GetUniqueMessageMatching(uint16 id) const {
- size_t found_index = 0;
- size_t found_count = 0;
- for (size_t i = 0; i < messages_.size(); i++) {
- if (messages_[i].type() == id) {
- found_count++;
- found_index = i;
- }
- }
- if (found_count != 1)
- return NULL; // Didn't find a unique one.
- return &messages_[found_index];
-}
-
-} // namespace IPC
+// Copyright (c) 2009 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. + +#include "chrome/common/ipc_test_sink.h" + +namespace IPC { + +TestSink::TestSink() { +} + +TestSink::~TestSink() { +} + +void TestSink::OnMessageReceived(const Message& msg) { + messages_.push_back(Message(msg)); +} + +void TestSink::ClearMessages() { + messages_.clear(); +} + +const Message* TestSink::GetMessageAt(size_t index) const { + if (index >= messages_.size()) + return NULL; + return &messages_[index]; +} + +const Message* TestSink::GetFirstMessageMatching(uint16 id) const { + for (size_t i = 0; i < messages_.size(); i++) { + if (messages_[i].type() == id) + return &messages_[i]; + } + return NULL; +} + +const Message* TestSink::GetUniqueMessageMatching(uint16 id) const { + size_t found_index = 0; + size_t found_count = 0; + for (size_t i = 0; i < messages_.size(); i++) { + if (messages_[i].type() == id) { + found_count++; + found_index = i; + } + } + if (found_count != 1) + return NULL; // Didn't find a unique one. + return &messages_[found_index]; +} + +} // namespace IPC |