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

Side by Side Diff: content/browser/web_contents/render_view_host_manager.cc

Issue 13877028: Renderer initiated navigations from non instant process should not fall into instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing another recently added test. Created 7 years, 7 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 "content/browser/web_contents/render_view_host_manager.h" 5 #include "content/browser/web_contents/render_view_host_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 controller.GetBrowserContext(), curr_entry->GetURL()) == 445 controller.GetBrowserContext(), curr_entry->GetURL()) ==
446 WebUIControllerFactoryRegistry::GetInstance()->GetWebUIType( 446 WebUIControllerFactoryRegistry::GetInstance()->GetWebUIType(
447 controller.GetBrowserContext(), new_entry->GetURL())); 447 controller.GetBrowserContext(), new_entry->GetURL()));
448 } 448 }
449 449
450 SiteInstance* RenderViewHostManager::GetSiteInstanceForEntry( 450 SiteInstance* RenderViewHostManager::GetSiteInstanceForEntry(
451 const NavigationEntryImpl& entry, 451 const NavigationEntryImpl& entry,
452 SiteInstance* curr_instance) { 452 SiteInstance* curr_instance) {
453 // NOTE: This is only called when ShouldTransitionCrossSite is true. 453 // NOTE: This is only called when ShouldTransitionCrossSite is true.
454 454
455 const GURL& dest_url = entry.GetURL();
456 NavigationControllerImpl& controller = 455 NavigationControllerImpl& controller =
457 delegate_->GetControllerForRenderManager(); 456 delegate_->GetControllerForRenderManager();
458 BrowserContext* browser_context = controller.GetBrowserContext(); 457 BrowserContext* browser_context = controller.GetBrowserContext();
458 const GURL& dest_url = GetContentClient()->browser()->
459 GetPossiblyPrivilegedURL(browser_context,
460 entry.GetURL(),
461 entry.is_renderer_initiated(),
462 curr_instance);
459 463
460 // If the entry has an instance already we should use it. 464 // If the entry has an instance already we should use it.
461 if (entry.site_instance()) 465 if (entry.site_instance())
462 return entry.site_instance(); 466 return entry.site_instance();
463 467
464 // (UGLY) HEURISTIC, process-per-site only: 468 // (UGLY) HEURISTIC, process-per-site only:
465 // 469 //
466 // If this navigation is generated, then it probably corresponds to a search 470 // If this navigation is generated, then it probably corresponds to a search
467 // query. Given that search results typically lead to users navigating to 471 // query. Given that search results typically lead to users navigating to
468 // other sites, we don't really want to use the search engine hostname to 472 // other sites, we don't really want to use the search engine hostname to
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost( 970 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost(
967 SiteInstance* instance) { 971 SiteInstance* instance) {
968 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId()); 972 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId());
969 if (iter != swapped_out_hosts_.end()) 973 if (iter != swapped_out_hosts_.end())
970 return iter->second; 974 return iter->second;
971 975
972 return NULL; 976 return NULL;
973 } 977 }
974 978
975 } // namespace content 979 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model_unittest.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698