| Index: chrome/browser/extensions/updater/extension_updater_unittest.cc
|
| diff --git a/chrome/browser/extensions/updater/extension_updater_unittest.cc b/chrome/browser/extensions/updater/extension_updater_unittest.cc
|
| index f0e433099ea3dbb54f299896e1d61f6b541d1e7a..45bba108d5e3ad13d3745468cf1dd091f5d24bc6 100644
|
| --- a/chrome/browser/extensions/updater/extension_updater_unittest.cc
|
| +++ b/chrome/browser/extensions/updater/extension_updater_unittest.cc
|
| @@ -50,7 +50,7 @@
|
| #include "content/public/browser/notification_registrar.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/notification_source.h"
|
| -#include "content/public/test/test_browser_thread.h"
|
| +#include "content/public/test/test_browser_thread_bundle.h"
|
| #include "extensions/common/id_util.h"
|
| #include "libxml/globals.h"
|
| #include "net/base/backoff_entry.h"
|
| @@ -210,7 +210,6 @@ class MockService : public TestExtensionService {
|
| : prefs_(prefs),
|
| pending_extension_manager_(*this),
|
| blacklist_(prefs_->prefs()) {
|
| - profile_.CreateRequestContext();
|
| }
|
|
|
| virtual ~MockService() {}
|
| @@ -468,17 +467,8 @@ static void VerifyQueryAndExtractParameters(
|
| // inside this class (which is a friend to ExtensionUpdater).
|
| class ExtensionUpdaterTest : public testing::Test {
|
| public:
|
| - ExtensionUpdaterTest()
|
| - : ui_thread_(BrowserThread::UI, &loop_),
|
| - file_thread_(BrowserThread::FILE, &loop_),
|
| - io_thread_(BrowserThread::IO, &loop_) {
|
| - }
|
| -
|
| - virtual ~ExtensionUpdaterTest() {
|
| - }
|
| -
|
| virtual void SetUp() OVERRIDE {
|
| - prefs_.reset(new TestExtensionPrefs(loop_.message_loop_proxy().get()));
|
| + prefs_.reset(new TestExtensionPrefs(base::MessageLoopProxy::current()));
|
| }
|
|
|
| virtual void TearDown() OVERRIDE {
|
| @@ -491,7 +481,7 @@ class ExtensionUpdaterTest : public testing::Test {
|
|
|
| void RunUntilIdle() {
|
| prefs_->pref_service()->CommitPendingWrite();
|
| - loop_.RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| void SimulateTimerFired(ExtensionUpdater* updater) {
|
| @@ -721,7 +711,6 @@ class ExtensionUpdaterTest : public testing::Test {
|
|
|
| void TestDetermineUpdates() {
|
| TestingProfile profile;
|
| - profile.CreateRequestContext();
|
| MockExtensionDownloaderDelegate delegate;
|
| ExtensionDownloader downloader(&delegate, profile.GetRequestContext());
|
|
|
| @@ -765,7 +754,6 @@ class ExtensionUpdaterTest : public testing::Test {
|
| SetupPendingExtensionManagerForTest(3, GURL(), pending_extension_manager);
|
|
|
| TestingProfile profile;
|
| - profile.CreateRequestContext();
|
| MockExtensionDownloaderDelegate delegate;
|
| ExtensionDownloader downloader(&delegate, profile.GetRequestContext());
|
|
|
| @@ -1308,7 +1296,7 @@ class ExtensionUpdaterTest : public testing::Test {
|
|
|
| // Set up 2 mock extensions, one with a google.com update url and one
|
| // without.
|
| - prefs_.reset(new TestExtensionPrefs(loop_.message_loop_proxy().get()));
|
| + prefs_.reset(new TestExtensionPrefs(base::MessageLoopProxy::current()));
|
| ServiceForManifestTests service(prefs_.get());
|
| ExtensionList tmp;
|
| GURL url1("http://clients2.google.com/service/update2/crx");
|
| @@ -1468,10 +1456,7 @@ class ExtensionUpdaterTest : public testing::Test {
|
| scoped_ptr<TestExtensionPrefs> prefs_;
|
|
|
| private:
|
| - base::MessageLoop loop_;
|
| - content::TestBrowserThread ui_thread_;
|
| - content::TestBrowserThread file_thread_;
|
| - content::TestBrowserThread io_thread_;
|
| + content::TestBrowserThreadBundle thread_bundle_;
|
|
|
| #if defined OS_CHROMEOS
|
| chromeos::ScopedTestDeviceSettingsService test_device_settings_service_;
|
|
|