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

Side by Side Diff: base/callback_internal.cc

Issue 6542026: Callback: De-inline CallbackBase, and move to callback_helpers -> callback_internal.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: add in the destrcutor actually Created 9 years, 10 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
« no previous file with comments | « base/callback_internal.h ('k') | base/callback_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 #include "base/callback_internal.h"
6
7 namespace base {
8 namespace internal {
9
10 bool CallbackBase::is_null() const {
11 return invoker_storage_.get() == NULL;
12 }
13
14 void CallbackBase::Reset() {
15 invoker_storage_ = NULL;
16 polymorphic_invoke_ = NULL;
17 }
18
19 bool CallbackBase::Equals(const CallbackBase& other) const {
20 return invoker_storage_.get() == other.invoker_storage_.get() &&
21 polymorphic_invoke_ == other.polymorphic_invoke_;
22 }
23
24 CallbackBase::CallbackBase(InvokeFuncStorage polymorphic_invoke,
25 scoped_refptr<InvokerStorageBase>* invoker_storage)
26 : polymorphic_invoke_(polymorphic_invoke) {
27 if (invoker_storage) {
28 invoker_storage_.swap(*invoker_storage);
29 }
30 }
31
32 CallbackBase::~CallbackBase() {
33 }
34
35 } // namespace base
36 } // namespace internal
OLDNEW
« no previous file with comments | « base/callback_internal.h ('k') | base/callback_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698