OLD | NEW |
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 #include <deque> | 5 #include <deque> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 run_loop_.Run(); | 188 run_loop_.Run(); |
189 EXPECT_TRUE(channel_destroyed_); | 189 EXPECT_TRUE(channel_destroyed_); |
190 } | 190 } |
191 | 191 |
192 private: | 192 private: |
193 // When destroyed, calls ChannelDestructionWatcher::OnChannelDestroyed. | 193 // When destroyed, calls ChannelDestructionWatcher::OnChannelDestroyed. |
194 // Ignores all messages. | 194 // Ignores all messages. |
195 class DestructionMessageFilter : public content::BrowserMessageFilter { | 195 class DestructionMessageFilter : public content::BrowserMessageFilter { |
196 public: | 196 public: |
197 explicit DestructionMessageFilter(ChannelDestructionWatcher* watcher) | 197 explicit DestructionMessageFilter(ChannelDestructionWatcher* watcher) |
198 : watcher_(watcher) { | 198 : BrowserMessageFilter(0), |
| 199 watcher_(watcher) { |
199 } | 200 } |
200 | 201 |
201 private: | 202 private: |
202 virtual ~DestructionMessageFilter() { | 203 virtual ~DestructionMessageFilter() { |
203 content::BrowserThread::PostTask( | 204 content::BrowserThread::PostTask( |
204 content::BrowserThread::UI, FROM_HERE, | 205 content::BrowserThread::UI, FROM_HERE, |
205 base::Bind(&ChannelDestructionWatcher::OnChannelDestroyed, | 206 base::Bind(&ChannelDestructionWatcher::OnChannelDestroyed, |
206 base::Unretained(watcher_))); | 207 base::Unretained(watcher_))); |
207 } | 208 } |
208 | 209 |
(...skipping 3903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4112 } | 4113 } |
4113 }; | 4114 }; |
4114 | 4115 |
4115 // Checks that prerendering works in incognito mode. | 4116 // Checks that prerendering works in incognito mode. |
4116 IN_PROC_BROWSER_TEST_F(PrerenderIncognitoBrowserTest, PrerenderIncognito) { | 4117 IN_PROC_BROWSER_TEST_F(PrerenderIncognitoBrowserTest, PrerenderIncognito) { |
4117 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1); | 4118 PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1); |
4118 NavigateToDestURL(); | 4119 NavigateToDestURL(); |
4119 } | 4120 } |
4120 | 4121 |
4121 } // namespace prerender | 4122 } // namespace prerender |
OLD | NEW |