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

Side by Side Diff: chrome/browser/tab_contents/render_view_host_manager.cc

Issue 341043: Changes session restore to use a normal load rather than preferring... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/tab_contents/render_view_host_manager.h" 5 #include "chrome/browser/tab_contents/render_view_host_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/dom_ui/dom_ui.h" 9 #include "chrome/browser/dom_ui/dom_ui.h"
10 #include "chrome/browser/dom_ui/dom_ui_factory.h" 10 #include "chrome/browser/dom_ui/dom_ui_factory.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 if (!curr_instance->has_site()) { 334 if (!curr_instance->has_site()) {
335 // If we've already created a SiteInstance for our destination, we don't 335 // If we've already created a SiteInstance for our destination, we don't
336 // want to use this unused SiteInstance; use the existing one. (We don't 336 // want to use this unused SiteInstance; use the existing one. (We don't
337 // do this check if the curr_instance has a site, because for now, we want 337 // do this check if the curr_instance has a site, because for now, we want
338 // to compare against the current URL and not the SiteInstance's site. In 338 // to compare against the current URL and not the SiteInstance's site. In
339 // this case, there is no current URL, so comparing against the site is ok. 339 // this case, there is no current URL, so comparing against the site is ok.
340 // See additional comments below.) 340 // See additional comments below.)
341 if (curr_instance->HasRelatedSiteInstance(dest_url)) { 341 if (curr_instance->HasRelatedSiteInstance(dest_url)) {
342 return curr_instance->GetRelatedSiteInstance(dest_url); 342 return curr_instance->GetRelatedSiteInstance(dest_url);
343 } else { 343 } else {
344 if (entry.restored()) 344 if (entry.restore_type() != NavigationEntry::RESTORE_NONE)
345 curr_instance->SetSite(dest_url); 345 curr_instance->SetSite(dest_url);
346 return curr_instance; 346 return curr_instance;
347 } 347 }
348 } 348 }
349 349
350 // Otherwise, only create a new SiteInstance for cross-site navigation. 350 // Otherwise, only create a new SiteInstance for cross-site navigation.
351 351
352 // TODO(creis): Once we intercept links and script-based navigations, we 352 // TODO(creis): Once we intercept links and script-based navigations, we
353 // will be able to enforce that all entries in a SiteInstance actually have 353 // will be able to enforce that all entries in a SiteInstance actually have
354 // the same site, and it will be safe to compare the URL against the 354 // the same site, and it will be safe to compare the URL against the
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 return render_view_host_; 582 return render_view_host_;
583 } 583 }
584 584
585 void RenderViewHostManager::CancelPending() { 585 void RenderViewHostManager::CancelPending() {
586 RenderViewHost* pending_render_view_host = pending_render_view_host_; 586 RenderViewHost* pending_render_view_host = pending_render_view_host_;
587 pending_render_view_host_ = NULL; 587 pending_render_view_host_ = NULL;
588 pending_render_view_host->Shutdown(); 588 pending_render_view_host->Shutdown();
589 589
590 pending_dom_ui_.reset(); 590 pending_dom_ui_.reset();
591 } 591 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/navigation_entry_unittest.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698