Index: chrome/browser/prerender/prerender_browsertest.cc |
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc |
index ec665307c3ef5903d36f22d402c54ad2c39a9ebb..c12ffdb6634262591d7e4bdba8ab0799592a1ef0 100644 |
--- a/chrome/browser/prerender/prerender_browsertest.cc |
+++ b/chrome/browser/prerender/prerender_browsertest.cc |
@@ -46,6 +46,7 @@ |
#include "content/public/browser/devtools_manager.h" |
#include "content/public/browser/notification_service.h" |
#include "content/public/browser/render_view_host.h" |
+#include "content/public/browser/session_storage_namespace.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/common/url_constants.h" |
#include "content/public/test/browser_test_utils.h" |
@@ -58,6 +59,7 @@ |
#include "ui/base/l10n/l10n_util.h" |
using content::BrowserThread; |
+using content::SessionStorageNamespaceMap; |
using content::DevToolsAgentHost; |
using content::DevToolsAgentHostRegistry; |
using content::DevToolsClientHost; |
@@ -246,9 +248,10 @@ class TestPrerenderContents : public PrerenderContents { |
} |
virtual WebContents* CreateWebContents( |
- content::SessionStorageNamespace* session_storage_namespace) OVERRIDE { |
+ const SessionStorageNamespaceMap& session_storage_namespace_map) |
+ OVERRIDE { |
WebContents* web_contents = PrerenderContents::CreateWebContents( |
- session_storage_namespace); |
+ session_storage_namespace_map); |
string16 ready_title = ASCIIToUTF16(kReadyTitle); |
if (prerender_should_wait_for_ready_title_) |
ready_title_watcher_.reset(new content::TitleWatcher( |
@@ -517,13 +520,13 @@ class PrerenderBrowserTest : virtual public InProcessBrowserTest { |
virtual ~PrerenderBrowserTest() {} |
- content::SessionStorageNamespace* GetSessionStorageNamespace() const { |
+ const SessionStorageNamespaceMap& GetSessionStorageNamespaceMap() const { |
TabContents* tab_contents = |
current_browser()->tab_strip_model()->GetActiveTabContents(); |
if (!tab_contents) |
- return NULL; |
+ return kEmptyMap; |
return tab_contents->web_contents()->GetController() |
- .GetSessionStorageNamespaceMap().find("")->second; |
+ .GetSessionStorageNamespaceMap(); |
} |
virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
@@ -744,7 +747,7 @@ class PrerenderBrowserTest : virtual public InProcessBrowserTest { |
bool UrlIsInPrerenderManager(const GURL& url) const { |
return GetPrerenderManager()->FindPrerenderData( |
- url, GetSessionStorageNamespace()) != NULL; |
+ url, GetSessionStorageNamespaceMap()) != NULL; |
} |
// This only checks to see if the URL is pending in our TestPrerenderContents. |
@@ -806,7 +809,7 @@ class PrerenderBrowserTest : virtual public InProcessBrowserTest { |
TestPrerenderContents* GetPrerenderContents() const { |
PrerenderManager::PrerenderData* prerender_data = |
GetPrerenderManager()->FindPrerenderData( |
- dest_url_, GetSessionStorageNamespace()); |
+ dest_url_, GetSessionStorageNamespaceMap()); |
return static_cast<TestPrerenderContents*>( |
prerender_data ? prerender_data->contents() : NULL); |
} |
@@ -1035,6 +1038,7 @@ class PrerenderBrowserTest : virtual public InProcessBrowserTest { |
std::string loader_path_; |
std::string loader_query_and_fragment_; |
Browser* explicitly_set_browser_; |
+ const SessionStorageNamespaceMap kEmptyMap; // Used for an error return. |
}; |
// Checks that a page is correctly prerendered in the case of a |