| 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 #include "sync/internal_api/public/util/weak_handle.h" | 5 #include "sync/internal_api/public/util/weak_handle.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 WeakHandleCoreBase::~WeakHandleCoreBase() {} | 24 WeakHandleCoreBase::~WeakHandleCoreBase() {} |
| 25 | 25 |
| 26 void WeakHandleCoreBase::PostToOwnerThread( | 26 void WeakHandleCoreBase::PostToOwnerThread( |
| 27 const tracked_objects::Location& from_here, | 27 const tracked_objects::Location& from_here, |
| 28 const base::Closure& fn) const { | 28 const base::Closure& fn) const { |
| 29 if (!owner_loop_proxy_->PostTask(from_here, fn)) { | 29 if (!owner_loop_proxy_->PostTask(from_here, fn)) { |
| 30 DVLOG(1) << "Could not post task from " << from_here.ToString(); | 30 DVLOG(1) << "Could not post task from " << from_here.ToString(); |
| 31 } | 31 } |
| 32 } | 32 } |
| 33 | 33 |
| 34 void WeakHandleCoreBase::PostWithReplyToOwnerThread( |
| 35 const tracked_objects::Location& from_here, |
| 36 const base::Closure& fn, |
| 37 const base::Closure& reply) const { |
| 38 if (!owner_loop_proxy_->PostTaskAndReply(from_here, fn, reply)) { |
| 39 DVLOG(1) << "Could not post task from " << from_here.ToString(); |
| 40 } |
| 41 } |
| 42 |
| 34 } // namespace internal | 43 } // namespace internal |
| 35 | 44 |
| 36 } // namespace syncer | 45 } // namespace syncer |
| OLD | NEW |