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

Side by Side Diff: chrome/browser/instant/instant_loader.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/instant/instant_loader.h" 5 #include "chrome/browser/instant/instant_loader.h"
6 6
7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 7 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
8 #include "chrome/browser/history/history_types.h" 8 #include "chrome/browser/history/history_types.h"
9 #include "chrome/browser/instant/instant_loader_delegate.h" 9 #include "chrome/browser/instant/instant_loader_delegate.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 loader_->loader_delegate_->InstantSupportDetermined(loader_, 258 loader_->loader_delegate_->InstantSupportDetermined(loader_,
259 supports_instant); 259 supports_instant);
260 } 260 }
261 261
262 // InstantLoader --------------------------------------------------------------- 262 // InstantLoader ---------------------------------------------------------------
263 263
264 InstantLoader::InstantLoader(InstantLoaderDelegate* delegate, 264 InstantLoader::InstantLoader(InstantLoaderDelegate* delegate,
265 const std::string& instant_url, 265 const std::string& instant_url,
266 const TabContents* tab_contents) 266 const TabContents* tab_contents)
267 : loader_delegate_(delegate), 267 : loader_delegate_(delegate),
268 preview_contents_(new TabContents(content::WebContents::Create( 268 preview_contents_(
269 tab_contents->profile(), NULL, MSG_ROUTING_NONE, 269 new TabContents(content::WebContents::CreateWithSessionStorage(
270 tab_contents->web_contents(), 270 tab_contents->profile(), NULL, MSG_ROUTING_NONE,
271 tab_contents->web_contents()->GetController(). 271 tab_contents->web_contents(),
272 GetSessionStorageNamespace()))), 272 tab_contents->web_contents()->GetController().
273 GetSessionStorageNamespaceMap()))),
273 supports_instant_(false), 274 supports_instant_(false),
274 instant_url_(instant_url) { 275 instant_url_(instant_url) {
275 } 276 }
276 277
277 InstantLoader::~InstantLoader() { 278 InstantLoader::~InstantLoader() {
278 if (preview_contents()) 279 if (preview_contents())
279 preview_contents_->web_contents()->SetDelegate(NULL); 280 preview_contents_->web_contents()->SetDelegate(NULL);
280 } 281 }
281 282
282 void InstantLoader::Init() { 283 void InstantLoader::Init() {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 TabContents* new_tc) { 393 TabContents* new_tc) {
393 DCHECK(old_tc == preview_contents_); 394 DCHECK(old_tc == preview_contents_);
394 CleanupPreviewContents(); 395 CleanupPreviewContents();
395 // We release here without deleting so that the caller still has the 396 // We release here without deleting so that the caller still has the
396 // responsibility for deleting the TabContents. 397 // responsibility for deleting the TabContents.
397 ignore_result(preview_contents_.release()); 398 ignore_result(preview_contents_.release());
398 preview_contents_.reset(new_tc); 399 preview_contents_.reset(new_tc);
399 SetupPreviewContents(); 400 SetupPreviewContents();
400 loader_delegate_->SwappedTabContents(this); 401 loader_delegate_->SwappedTabContents(this);
401 } 402 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_controller.cc ('k') | chrome/browser/notifications/balloon_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698