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

Side by Side Diff: chrome/browser/sync/util/weak_handle.cc

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments Created 8 years, 9 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
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 "chrome/browser/sync/util/weak_handle.h"
6
7 #include <sstream>
8
9 #include "base/callback.h"
10 #include "base/location.h"
11 #include "base/message_loop_proxy.h"
12
13 namespace browser_sync {
14
15 namespace internal {
16
17 WeakHandleCoreBase::WeakHandleCoreBase()
18 : owner_loop_proxy_(base::MessageLoopProxy::current()) {}
19
20 bool WeakHandleCoreBase::IsOnOwnerThread() const {
21 return owner_loop_proxy_->BelongsToCurrentThread();
22 }
23
24 WeakHandleCoreBase::~WeakHandleCoreBase() {}
25
26 void WeakHandleCoreBase::PostToOwnerThread(
27 const tracked_objects::Location& from_here,
28 const base::Closure& fn) const {
29 if (!owner_loop_proxy_->PostTask(from_here, fn)) {
30 DVLOG(1) << "Could not post task from " << from_here.ToString();
31 }
32 }
33
34 } // namespace internal
35
36 } // namespace base
OLDNEW
« no previous file with comments | « chrome/browser/sync/util/weak_handle.h ('k') | chrome/browser/sync/util/weak_handle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698