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

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

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/lib/filter_chain.h ('k') | mojo/public/cpp/bindings/lib/fixed_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/filter_chain.cc
diff --git a/mojo/public/cpp/bindings/lib/filter_chain.cc b/mojo/public/cpp/bindings/lib/filter_chain.cc
deleted file mode 100644
index d32eb7860896e3d670c3075310d57f4276092a89..0000000000000000000000000000000000000000
--- a/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 "mojo/public/cpp/bindings/lib/filter_chain.h"
-
-#include <algorithm>
-
-#include "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
« no previous file with comments | « mojo/public/cpp/bindings/lib/filter_chain.h ('k') | mojo/public/cpp/bindings/lib/fixed_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698