diff options
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/interstitial_page.cc | 3 | ||||
-rw-r--r-- | chrome/browser/tab_contents/interstitial_page.h | 3 | ||||
-rw-r--r-- | chrome/browser/tab_contents/web_contents_unittest.cc | 7 |
3 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc index 075c809..b2dec89 100644 --- a/chrome/browser/tab_contents/interstitial_page.cc +++ b/chrome/browser/tab_contents/interstitial_page.cc @@ -132,7 +132,6 @@ InterstitialPage::InterstitialPage(TabContents* tab, original_rvh_id_(tab->render_view_host()->routing_id()), should_revert_tab_title_(false), resource_dispatcher_host_notified_(false), - ui_loop_(MessageLoop::current()), ALLOW_THIS_IN_INITIALIZER_LIST(rvh_view_delegate_( new InterstitialPageRVHViewDelegate(this))) { InitInterstitialPageMap(); @@ -484,7 +483,7 @@ void InterstitialPage::Disable() { void InterstitialPage::TakeActionOnResourceDispatcher( ResourceRequestAction action) { - DCHECK(MessageLoop::current() == ui_loop_) << + DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)) << "TakeActionOnResourceDispatcher should be called on the main thread."; if (action == CANCEL || action == RESUME) { diff --git a/chrome/browser/tab_contents/interstitial_page.h b/chrome/browser/tab_contents/interstitial_page.h index b6d30c4..aff6a74 100644 --- a/chrome/browser/tab_contents/interstitial_page.h +++ b/chrome/browser/tab_contents/interstitial_page.h @@ -15,7 +15,6 @@ #include "chrome/common/renderer_preferences.h" #include "googleurl/src/gurl.h" -class MessageLoop; class NavigationEntry; class TabContents; class TabContentsView; @@ -199,8 +198,6 @@ class InterstitialPage : public NotificationObserver, // interstitial is hidden. std::wstring original_tab_title_; - MessageLoop* ui_loop_; - // Our RenderViewHostViewDelegate, necessary for accelerators to work. scoped_ptr<InterstitialPageRVHViewDelegate> rvh_view_delegate_; diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc index 509e295..0021691 100644 --- a/chrome/browser/tab_contents/web_contents_unittest.cc +++ b/chrome/browser/tab_contents/web_contents_unittest.cc @@ -7,6 +7,7 @@ #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/render_widget_host_view.h" #include "chrome/browser/renderer_host/test/test_render_view_host.h" +#include "chrome/browser/chrome_thread.h" #include "chrome/browser/tab_contents/interstitial_page.h" #include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/browser/tab_contents/navigation_entry.h" @@ -191,7 +192,9 @@ class TestInterstitialPageStateGuard : public TestInterstitialPage::Delegate { class TabContentsTest : public RenderViewHostTestHarness { public: - TabContentsTest() : RenderViewHostTestHarness() { + TabContentsTest() + : RenderViewHostTestHarness(), + ui_thread_(ChromeThread::UI, &message_loop_) { } private: @@ -201,6 +204,8 @@ class TabContentsTest : public RenderViewHostTestHarness { profile_.reset(new TabContentsTestingProfile()); RenderViewHostTestHarness::SetUp(); } + + ChromeThread ui_thread_; }; // Test to make sure that title updates get stripped of whitespace. |