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

Side by Side Diff: content/child/thread_safe_sender.h

Issue 104663007: IndexedDB: Optimize IDBCursor.advance() if it occurs within prefetched range (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comments about virtual usage Created 7 years 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 | « content/child/indexed_db/webidbcursor_impl_unittest.cc ('k') | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CONTENT_CHILD_THREAD_SAFE_SENDER_H_ 5 #ifndef CONTENT_CHILD_THREAD_SAFE_SENDER_H_
6 #define CONTENT_CHILD_THREAD_SAFE_SENDER_H_ 6 #define CONTENT_CHILD_THREAD_SAFE_SENDER_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 12 matching lines...) Expand all
23 23
24 // The class of Sender returned by ChildThread::thread_safe_sender(). 24 // The class of Sender returned by ChildThread::thread_safe_sender().
25 class CONTENT_EXPORT ThreadSafeSender 25 class CONTENT_EXPORT ThreadSafeSender
26 : public IPC::Sender, 26 : public IPC::Sender,
27 public base::RefCountedThreadSafe<ThreadSafeSender> { 27 public base::RefCountedThreadSafe<ThreadSafeSender> {
28 public: 28 public:
29 virtual bool Send(IPC::Message* msg) OVERRIDE; 29 virtual bool Send(IPC::Message* msg) OVERRIDE;
30 30
31 private: 31 private:
32 friend class ChildThread; // for construction 32 friend class ChildThread; // for construction
33 friend class WebIDBCursorImplTest;
33 friend class base::RefCountedThreadSafe<ThreadSafeSender>; 34 friend class base::RefCountedThreadSafe<ThreadSafeSender>;
34 FRIEND_TEST_ALL_PREFIXES(IndexedDBDispatcherTest, ValueSizeTest); 35 FRIEND_TEST_ALL_PREFIXES(IndexedDBDispatcherTest, ValueSizeTest);
35 FRIEND_TEST_ALL_PREFIXES(WebIDBCursorImplTest, PrefetchTest);
36 36
37 ThreadSafeSender(base::MessageLoopProxy* main_loop, 37 ThreadSafeSender(base::MessageLoopProxy* main_loop,
38 IPC::SyncMessageFilter* sync_filter); 38 IPC::SyncMessageFilter* sync_filter);
39 virtual ~ThreadSafeSender(); 39 virtual ~ThreadSafeSender();
40 40
41 scoped_refptr<base::MessageLoopProxy> main_loop_; 41 scoped_refptr<base::MessageLoopProxy> main_loop_;
42 scoped_refptr<IPC::SyncMessageFilter> sync_filter_; 42 scoped_refptr<IPC::SyncMessageFilter> sync_filter_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(ThreadSafeSender); 44 DISALLOW_COPY_AND_ASSIGN(ThreadSafeSender);
45 }; 45 };
46 46
47 } // namespace content 47 } // namespace content
48 48
49 #endif // CONTENT_CHILD_THREAD_SAFE_SENDER_H_ 49 #endif // CONTENT_CHILD_THREAD_SAFE_SENDER_H_
OLDNEW
« no previous file with comments | « content/child/indexed_db/webidbcursor_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698