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

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

Issue 12301013: Ensure extensions and the Chrome Web Store are loaded in new BrowsingInstances. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review comments. Created 7 years, 10 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 } 424 }
425 } else { 425 } else {
426 // Force swap if it's a Web UI URL. 426 // Force swap if it's a Web UI URL.
427 if (WebUIControllerFactoryRegistry::GetInstance()->UseWebUIForURL( 427 if (WebUIControllerFactoryRegistry::GetInstance()->UseWebUIForURL(
428 browser_context, new_entry->GetURL())) { 428 browser_context, new_entry->GetURL())) {
429 return true; 429 return true;
430 } 430 }
431 } 431 }
432 432
433 if (GetContentClient()->browser()->ShouldSwapProcessesForNavigation( 433 if (GetContentClient()->browser()->ShouldSwapProcessesForNavigation(
434 curr_entry ? curr_entry->GetURL() : GURL(), new_entry->GetURL())) { 434 render_view_host_->GetSiteInstance(),
435 curr_entry ? curr_entry->GetURL() : GURL(),
436 new_entry->GetURL())) {
435 return true; 437 return true;
436 } 438 }
437 439
438 if (!curr_entry) 440 if (!curr_entry)
439 return false; 441 return false;
440 442
441 // We can't switch a RenderView between view source and non-view source mode 443 // We can't switch a RenderView between view source and non-view source mode
442 // without screwing up the session history sometimes (when navigating between 444 // without screwing up the session history sometimes (when navigating between
443 // "view-source:http://foo.com/" and "http://foo.com/", WebKit doesn't treat 445 // "view-source:http://foo.com/" and "http://foo.com/", WebKit doesn't treat
444 // it as a new navigation). So require a view switch. 446 // it as a new navigation). So require a view switch.
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost( 971 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost(
970 SiteInstance* instance) { 972 SiteInstance* instance) {
971 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId()); 973 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId());
972 if (iter != swapped_out_hosts_.end()) 974 if (iter != swapped_out_hosts_.end())
973 return iter->second; 975 return iter->second;
974 976
975 return NULL; 977 return NULL;
976 } 978 }
977 979
978 } // namespace content 980 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_manager_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