Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(999)

Unified Diff: content/browser/web_contents/test_web_contents.cc

Issue 10831116: Move SessionStorageNamespace entirely into NavigationController and support StoragePartitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged ToT Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/test_web_contents.cc
diff --git a/content/browser/web_contents/test_web_contents.cc b/content/browser/web_contents/test_web_contents.cc
index f95de46497144fef3c25958fce7467e85175afd3..0a1ca78512b38d807350bfeb8943a1a8c4913e02 100644
--- a/content/browser/web_contents/test_web_contents.cc
+++ b/content/browser/web_contents/test_web_contents.cc
@@ -22,10 +22,8 @@
namespace content {
-TestWebContents::TestWebContents(BrowserContext* browser_context,
- SiteInstance* instance)
- : WebContentsImpl(browser_context, instance, MSG_ROUTING_NONE, NULL, NULL,
- NULL),
+TestWebContents::TestWebContents(BrowserContext* browser_context)
+ : WebContentsImpl(browser_context, NULL),
transition_cross_site(false),
delegate_view_override_(NULL),
expect_set_history_length_and_prune_(false),
@@ -34,6 +32,13 @@ TestWebContents::TestWebContents(BrowserContext* browser_context,
expect_set_history_length_and_prune_min_page_id_(-1) {
}
+TestWebContents* TestWebContents::Create(BrowserContext* browser_context,
+ SiteInstance* instance) {
+ TestWebContents* test_web_contents = new TestWebContents(browser_context);
+ test_web_contents->Init(browser_context, instance, MSG_ROUTING_NONE, NULL);
+ return test_web_contents;
+}
+
TestWebContents::~TestWebContents() {
}
@@ -99,10 +104,9 @@ bool TestWebContents::CreateRenderViewForRenderManager(
}
WebContents* TestWebContents::Clone() {
- WebContentsImpl* contents = new TestWebContents(
- GetBrowserContext(),
- SiteInstance::Create(GetBrowserContext()));
- contents->GetControllerImpl().CopyStateFrom(controller_);
+ WebContentsImpl* contents =
+ Create(GetBrowserContext(), SiteInstance::Create(GetBrowserContext()));
+ contents->GetController().CopyStateFrom(controller_);
return contents;
}
« no previous file with comments | « content/browser/web_contents/test_web_contents.h ('k') | content/browser/web_contents/web_contents_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698