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

Side by Side Diff: chrome/common/net/notifier/base/fastalloc.h

Issue 1956001: Moved XMPP notifier library from chrome/browser/sync to chrome/common.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 CHROME_BROWSER_SYNC_NOTIFIER_BASE_FASTALLOC_H_ 5 #ifndef CHROME_COMMON_NET_NOTIFIER_BASE_FASTALLOC_H_
6 #define CHROME_BROWSER_SYNC_NOTIFIER_BASE_FASTALLOC_H_ 6 #define CHROME_COMMON_NET_NOTIFIER_BASE_FASTALLOC_H_
7 7
8 #include <assert.h> 8 #include <assert.h>
9 9
10 namespace notifier { 10 namespace notifier {
11 11
12 template<class T, size_t Size> 12 template<class T, size_t Size>
13 class FastAlloc { 13 class FastAlloc {
14 public: 14 public:
15 FastAlloc() : buffer_(NULL), size_(0) { } 15 FastAlloc() : buffer_(NULL), size_(0) { }
16 ~FastAlloc() { freeBuffer(); } 16 ~FastAlloc() { freeBuffer(); }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 size_ = 0; 49 size_ = 0;
50 } 50 }
51 51
52 T* buffer_; 52 T* buffer_;
53 T internal_buffer_[Size]; 53 T internal_buffer_[Size];
54 size_t size_; 54 size_t size_;
55 }; 55 };
56 56
57 } 57 }
58 58
59 #endif // CHROME_BROWSER_SYNC_NOTIFIER_BASE_FASTALLOC_H_ 59 #endif // CHROME_COMMON_NET_NOTIFIER_BASE_FASTALLOC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698