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

Unified Diff: chrome/browser/ui/apps/chrome_shell_window_delegate.cc

Issue 23847004: "Redirecting URLs to Packaged Apps" implementation: revised (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed an editing error Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/apps/chrome_shell_window_delegate.cc
diff --git a/chrome/browser/ui/apps/chrome_shell_window_delegate.cc b/chrome/browser/ui/apps/chrome_shell_window_delegate.cc
index fe1e234a5ecb4acabeee949146ead63c7728929c..becf2019bfba2b1f8ae0be6c185e85f79d803eb8 100644
--- a/chrome/browser/ui/apps/chrome_shell_window_delegate.cc
+++ b/chrome/browser/ui/apps/chrome_shell_window_delegate.cc
@@ -5,10 +5,12 @@
#include "chrome/browser/ui/apps/chrome_shell_window_delegate.h"
#include "base/strings/stringprintf.h"
+#include "chrome/browser/apps/app_url_redirector.h"
#include "chrome/browser/favicon/favicon_tab_helper.h"
#include "chrome/browser/file_select_helper.h"
#include "chrome/browser/media/media_capture_devices_dispatcher.h"
#include "chrome/browser/platform_util.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_finder.h"
@@ -62,6 +64,14 @@ void ChromeShellWindowDelegate::DisableExternalOpenForTesting() {
void ChromeShellWindowDelegate::InitWebContents(
content::WebContents* web_contents) {
+ // We don't want to ever send visited URLs to apps in incognito.
+ // Technically, apps are not supported in incognito, but explicitly check
+ // for that. See b/240879, which tracks incognito support for v2 apps.
+ Profile* profile =
+ Profile::FromBrowserContext(web_contents->GetBrowserContext());
+ if (!profile->IsOffTheRecord())
not at google - send to devlin 2013/09/04 15:37:21 why do you need to intercept navigations from shel
benwells 2013/09/04 23:54:20 Platform apps can navigate which would normally op
not at google - send to devlin 2013/09/05 00:01:52 It seems like there are a whole bunch of other pla
sergeygs 2013/09/05 09:19:03 To intercept target=_blank and window.open() navig
sergeygs 2013/09/05 09:19:03 Not exactly a whole bunch, according to I found, a
+ AppUrlRedirector::CreateForWebContents(web_contents);
+
FaviconTabHelper::CreateForWebContents(web_contents);
#if defined(ENABLE_PRINTING)

Powered by Google App Engine
This is Rietveld 408576698