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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 7063015: Swap processes on reload if a hosted app has been installed/uninstalled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile on Windows Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 551
552 bool ChromeContentRendererClient::CrossesExtensionExtents(WebFrame* frame, 552 bool ChromeContentRendererClient::CrossesExtensionExtents(WebFrame* frame,
553 const GURL& new_url) { 553 const GURL& new_url) {
554 const ExtensionSet* extensions = extension_dispatcher_->extensions(); 554 const ExtensionSet* extensions = extension_dispatcher_->extensions();
555 // If the URL is still empty, this is a window.open navigation. Check the 555 // If the URL is still empty, this is a window.open navigation. Check the
556 // opener's URL. 556 // opener's URL.
557 GURL old_url(frame->url()); 557 GURL old_url(frame->url());
558 if (old_url.is_empty() && frame->opener()) 558 if (old_url.is_empty() && frame->opener())
559 old_url = frame->opener()->url(); 559 old_url = frame->opener()->url();
560 560
561 // If this is a reload, check whether it has the wrong process type. We
562 // should send it to the browser if it's an extension URL (e.g., hosted app)
563 // in a normal process, or if it's a process for an extension that has been
564 // uninstalled.
565 if (old_url == new_url) {
566 bool is_extension_url = !!extensions->GetByURL(new_url);
567 if (is_extension_url != extension_dispatcher_->is_extension_process())
568 return true;
569 }
570
561 return !extensions->InSameExtent(old_url, new_url); 571 return !extensions->InSameExtent(old_url, new_url);
562 } 572 }
563 573
564 } // namespace chrome 574 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager_resource_providers.cc ('k') | content/browser/site_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698