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

Side by Side Diff: base/scoped_observer.h

Issue 10735044: Remove #pragma once. Just from base/ for now. (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
« no previous file with comments | « base/scoped_native_library.h ('k') | base/scoped_temp_dir.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef BASE_SCOPED_OBSERVER_H_ 5 #ifndef BASE_SCOPED_OBSERVER_H_
6 #define BASE_SCOPED_OBSERVER_H_ 6 #define BASE_SCOPED_OBSERVER_H_
7 #pragma once
8 7
9 #include <algorithm> 8 #include <algorithm>
10 #include <vector> 9 #include <vector>
11 10
12 #include "base/basictypes.h" 11 #include "base/basictypes.h"
13 12
14 // ScopedObserver is used to keep track of the set of sources an object has 13 // ScopedObserver is used to keep track of the set of sources an object has
15 // attached itself to as an observer. When ScopedObserver is destroyed it 14 // attached itself to as an observer. When ScopedObserver is destroyed it
16 // removes the object as an observer from all sources it has been added to. 15 // removes the object as an observer from all sources it has been added to.
17 template <class Source, class Observer> 16 template <class Source, class Observer>
(...skipping 20 matching lines...) Expand all
38 37
39 private: 38 private:
40 Observer* observer_; 39 Observer* observer_;
41 40
42 std::vector<Source*> sources_; 41 std::vector<Source*> sources_;
43 42
44 DISALLOW_COPY_AND_ASSIGN(ScopedObserver); 43 DISALLOW_COPY_AND_ASSIGN(ScopedObserver);
45 }; 44 };
46 45
47 #endif // BASE_SCOPED_OBSERVER_H_ 46 #endif // BASE_SCOPED_OBSERVER_H_
OLDNEW
« no previous file with comments | « base/scoped_native_library.h ('k') | base/scoped_temp_dir.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698