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

Side by Side Diff: sync/internal_api/public/util/weak_handle.h

Issue 10700154: Remove #pragma once from sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
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 // Weak handles provides a way to refer to weak pointers from another 5 // Weak handles provides a way to refer to weak pointers from another
6 // thread. This is useful because it is not safe to reference a weak 6 // thread. This is useful because it is not safe to reference a weak
7 // pointer from a thread other than the thread on which it was 7 // pointer from a thread other than the thread on which it was
8 // created. 8 // created.
9 // 9 //
10 // Weak handles can be passed across threads, so for example, you can 10 // Weak handles can be passed across threads, so for example, you can
(...skipping 28 matching lines...) Expand all
39 // 39 //
40 // /* Will always be called on the correct thread, and only if this 40 // /* Will always be called on the correct thread, and only if this
41 // object hasn't been destroyed. */ 41 // object hasn't been destroyed. */
42 // void OnIOStart() { DCHECK(CalledOnValidThread(); ... } 42 // void OnIOStart() { DCHECK(CalledOnValidThread(); ... }
43 // void OnIOEvent(IOEvent e) { DCHECK(CalledOnValidThread(); ... } 43 // void OnIOEvent(IOEvent e) { DCHECK(CalledOnValidThread(); ... }
44 // void OnIOError(IOError err) { DCHECK(CalledOnValidThread(); ... } 44 // void OnIOError(IOError err) { DCHECK(CalledOnValidThread(); ... }
45 // }; 45 // };
46 46
47 #ifndef SYNC_UTIL_WEAK_HANDLE_H_ 47 #ifndef SYNC_UTIL_WEAK_HANDLE_H_
48 #define SYNC_UTIL_WEAK_HANDLE_H_ 48 #define SYNC_UTIL_WEAK_HANDLE_H_
49 #pragma once
50 49
51 #include <cstddef> 50 #include <cstddef>
52 51
53 #include "base/basictypes.h" 52 #include "base/basictypes.h"
54 #include "base/bind.h" 53 #include "base/bind.h"
55 #include "base/callback_forward.h" 54 #include "base/callback_forward.h"
56 #include "base/compiler_specific.h" 55 #include "base/compiler_specific.h"
57 #include "base/gtest_prod_util.h" 56 #include "base/gtest_prod_util.h"
58 #include "base/location.h" 57 #include "base/location.h"
59 #include "base/logging.h" 58 #include "base/logging.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 369
371 // Makes a WeakHandle from a WeakPtr. 370 // Makes a WeakHandle from a WeakPtr.
372 template <typename T> 371 template <typename T>
373 WeakHandle<T> MakeWeakHandle(const base::WeakPtr<T>& ptr) { 372 WeakHandle<T> MakeWeakHandle(const base::WeakPtr<T>& ptr) {
374 return WeakHandle<T>(ptr); 373 return WeakHandle<T>(ptr);
375 } 374 }
376 375
377 } // namespace syncer 376 } // namespace syncer
378 377
379 #endif // SYNC_UTIL_WEAK_HANDLE_H_ 378 #endif // SYNC_UTIL_WEAK_HANDLE_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/util/unrecoverable_error_info.h ('k') | sync/internal_api/public/write_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698