diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-03 02:27:01 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-03 02:27:01 +0000 |
commit | 0d3dc8e2804b0adc4f572944db027929e2b5af5a (patch) | |
tree | efe4a3ecde226002698017cceba2952b8979a66f /chrome/browser/tab_contents | |
parent | 8dc291a4dbeed088fbdc36115b250c5f83d3edde (diff) | |
download | chromium_src-0d3dc8e2804b0adc4f572944db027929e2b5af5a.zip chromium_src-0d3dc8e2804b0adc4f572944db027929e2b5af5a.tar.gz chromium_src-0d3dc8e2804b0adc4f572944db027929e2b5af5a.tar.bz2 |
Fifth patch in getting rid of caching MessageLoop pointers.
BUG=25354
Review URL: http://codereview.chromium.org/345037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30790 0039d316-1c4b-4281-b951-d872f2087c98
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. |