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

Side by Side Diff: content/browser/browser_thread_impl.h

Issue 2487073005: Remove direct usage of BrowserThreadImpl in tests (Closed)
Patch Set: The RDHImpl is actually not even necessary in ResourceSchedulerTest, removed. Created 4 years, 1 month 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
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 CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ 5 #ifndef CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_
6 #define CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ 6 #define CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_
7 7
8 #include "base/threading/platform_thread.h" 8 #include "base/threading/platform_thread.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 // Very few users should use this directly. To mock BrowserThreads, tests should
16 // use TestBrowserThreadBundle instead.
15 class CONTENT_EXPORT BrowserThreadImpl : public BrowserThread, 17 class CONTENT_EXPORT BrowserThreadImpl : public BrowserThread,
16 public base::Thread { 18 public base::Thread {
17 public: 19 public:
18 // Construct a BrowserThreadImpl with the supplied identifier. It is an error 20 // Construct a BrowserThreadImpl with the supplied identifier. It is an error
19 // to construct a BrowserThreadImpl that already exists. 21 // to construct a BrowserThreadImpl that already exists.
20 explicit BrowserThreadImpl(BrowserThread::ID identifier); 22 explicit BrowserThreadImpl(BrowserThread::ID identifier);
21 23
22 // Special constructor for the main (UI) thread and unittests. If a 24 // Special constructor for the main (UI) thread and unittests. If a
23 // |message_loop| is provied, we use a dummy thread here since the main 25 // |message_loop| is provied, we use a dummy thread here since the main
24 // thread already exists. 26 // thread already exists.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 static void FlushThreadPoolHelperForTesting(); 71 static void FlushThreadPoolHelperForTesting();
70 72
71 // The identifier of this thread. Only one thread can exist with a given 73 // The identifier of this thread. Only one thread can exist with a given
72 // identifier at a given time. 74 // identifier at a given time.
73 ID identifier_; 75 ID identifier_;
74 }; 76 };
75 77
76 } // namespace content 78 } // namespace content
77 79
78 #endif // CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ 80 #endif // CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/appcache/chrome_appcache_service_unittest.cc ('k') | content/browser/download/base_file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698