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

Unified Diff: chrome/browser/utility_process_host_unittest.cc

Issue 345023: Get rid of MessageLoop* caching in extensions code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/utility_process_host.cc ('k') | chrome/browser/web_resource/web_resource_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/utility_process_host_unittest.cc
===================================================================
--- chrome/browser/utility_process_host_unittest.cc (revision 30521)
+++ chrome/browser/utility_process_host_unittest.cc (working copy)
@@ -22,17 +22,17 @@
class UtilityProcessHostTest : public testing::Test {
public:
- UtilityProcessHostTest() {
+ UtilityProcessHostTest() : io_thread_(ChromeThread::IO, &message_loop_) {
}
protected:
MessageLoopForIO message_loop_;
+ ChromeThread io_thread_;
};
class TestUtilityProcessHostClient : public UtilityProcessHost::Client {
public:
- explicit TestUtilityProcessHostClient(MessageLoop* message_loop)
- : message_loop_(message_loop), success_(false) {
+ explicit TestUtilityProcessHostClient() : success_(false) {
}
// UtilityProcessHost::Client methods.
@@ -63,16 +63,14 @@
}
private:
- MessageLoop* message_loop_;
bool success_;
};
class TestUtilityProcessHost : public UtilityProcessHost {
public:
TestUtilityProcessHost(TestUtilityProcessHostClient* client,
- MessageLoop* loop_io,
ResourceDispatcherHost* rdh)
- : UtilityProcessHost(rdh, client, loop_io) {
+ : UtilityProcessHost(rdh, client, ChromeThread::IO) {
}
protected:
@@ -140,10 +138,10 @@
temp_extension_dir.AppendASCII("theme.crx")));
scoped_refptr<TestUtilityProcessHostClient> client(
- new TestUtilityProcessHostClient(&message_loop_));
+ new TestUtilityProcessHostClient());
ResourceDispatcherHost rdh(NULL);
TestUtilityProcessHost* process_host =
- new TestUtilityProcessHost(client.get(), &message_loop_, &rdh);
+ new TestUtilityProcessHost(client.get(), &rdh);
// process_host will delete itself when it's done.
ProcessClosedObserver observer(&message_loop_);
process_host->StartExtensionUnpacker(
« no previous file with comments | « chrome/browser/utility_process_host.cc ('k') | chrome/browser/web_resource/web_resource_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698