| Index: chrome/browser/instant/instant_loader.cc
|
| diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
|
| index 41c9c856daa4abdaf84ed53a3b6c399b34c49ead..3fa6b74521287eec115d0dbff2b5612fbd1914b7 100644
|
| --- a/chrome/browser/instant/instant_loader.cc
|
| +++ b/chrome/browser/instant/instant_loader.cc
|
| @@ -93,7 +93,12 @@ void AddPreviewUsageForHistogram(TemplateURLID template_url_id,
|
| }
|
|
|
| SessionStorageNamespace* GetSessionStorageNamespace(TabContents* tab) {
|
| - return tab->web_contents()->GetController().GetSessionStorageNamespace();
|
| + // TODO(ajwong): This is wrong because it assumes a default
|
| + // SessionStorageNamespace for a TabContents.
|
| + //
|
| + // http://crbug.com/140612
|
| + return tab->web_contents()->GetController()
|
| + .GetDefaultSessionStorageNamespace();
|
| }
|
|
|
| } // namespace
|
| @@ -851,6 +856,8 @@ TabContents* InstantLoader::ReleasePreviewContents(
|
| type == INSTANT_COMMIT_DESTROY ? PREVIEW_DELETED : PREVIEW_COMMITTED,
|
| group_);
|
| if (type != INSTANT_COMMIT_DESTROY) {
|
| + // This tracks the number of times a committed preview page destroys the
|
| + // Session Storage for the tab.
|
| base::Histogram* histogram = base::LinearHistogram::FactoryGet(
|
| "Instant.SessionStorageNamespace" + group_, 1, 2, 3,
|
| base::Histogram::kUmaTargetedHistogramFlag);
|
| @@ -1144,7 +1151,7 @@ void InstantLoader::SetupPreviewContents(TabContents* tab_contents) {
|
|
|
| void InstantLoader::CreatePreviewContents(TabContents* tab_contents) {
|
| WebContents* new_contents = WebContents::Create(
|
| - tab_contents->profile(), NULL, MSG_ROUTING_NONE, NULL, NULL);
|
| + tab_contents->profile(), NULL, MSG_ROUTING_NONE, NULL);
|
| preview_contents_.reset(new TabContents(new_contents));
|
| AddPreviewUsageForHistogram(template_url_id_, PREVIEW_CREATED, group_);
|
| session_storage_namespace_ = GetSessionStorageNamespace(tab_contents);
|
|
|