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

Unified Diff: third_party/mojo/src/mojo/public/cpp/bindings/lib/filter_chain.cc

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/mojo/src/mojo/public/cpp/bindings/lib/filter_chain.cc
diff --git a/third_party/mojo/src/mojo/public/cpp/bindings/lib/filter_chain.cc b/third_party/mojo/src/mojo/public/cpp/bindings/lib/filter_chain.cc
deleted file mode 100644
index 4194f6900ce7a649c2e988ecf26b7a17f7d8f154..0000000000000000000000000000000000000000
--- a/third_party/mojo/src/mojo/public/cpp/bindings/lib/filter_chain.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2014 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 "third_party/mojo/src/mojo/public/cpp/bindings/lib/filter_chain.h"
-
-#include <algorithm>
-
-#include "third_party/mojo/src/mojo/public/cpp/environment/logging.h"
-
-namespace mojo {
-namespace internal {
-
-FilterChain::FilterChain(MessageReceiver* sink) : sink_(sink) {
-}
-
-FilterChain::FilterChain(FilterChain&& other) : sink_(other.sink_) {
- other.sink_ = nullptr;
- filters_.swap(other.filters_);
-}
-
-FilterChain& FilterChain::operator=(FilterChain&& other) {
- std::swap(sink_, other.sink_);
- filters_.swap(other.filters_);
- return *this;
-}
-
-FilterChain::~FilterChain() {
- for (std::vector<MessageFilter*>::iterator iter = filters_.begin();
- iter != filters_.end();
- ++iter) {
- delete *iter;
- }
-}
-
-void FilterChain::SetSink(MessageReceiver* sink) {
- MOJO_DCHECK(!sink_);
- sink_ = sink;
- if (!filters_.empty())
- filters_.back()->set_sink(sink);
-}
-
-MessageReceiver* FilterChain::GetHead() {
- MOJO_DCHECK(sink_);
- return filters_.empty() ? sink_ : filters_.front();
-}
-
-} // namespace internal
-} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698