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

Unified Diff: apps/launcher.cc

Issue 280703003: Don't ever create a file in about:blank when launching packaged apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/launcher.cc
diff --git a/apps/launcher.cc b/apps/launcher.cc
index e081eb185f131589133144d3a6fa50d822c4ea9e..d7c0522ff4edcdbc1c0777919753ffcce14ce944 100644
--- a/apps/launcher.cc
+++ b/apps/launcher.cc
@@ -20,6 +20,7 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/url_constants.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_host.h"
#include "extensions/browser/extension_prefs.h"
@@ -351,7 +352,18 @@ void LaunchPlatformAppWithCommandLine(Profile* profile,
}
}
- if (command_line.GetArgs().empty()) {
+#if defined(OS_WIN)
+ base::CommandLine::StringType about_blank_url(
tapted 2014/05/13 06:47:04 if you don't want the #ifdef, you could use bas
+ base::ASCIIToWide(content::kAboutBlankURL));
+#else
+ base::CommandLine::StringType about_blank_url(content::kAboutBlankURL);
+#endif
+ // Browser tests will add about:blank to the command line. This should
+ // never be interpreted as a file to open, as doing so with an app that
+ // has write access will result in a file 'about' being created, which
+ // causes problems on the bots.
+ if (command_line.GetArgs().empty() ||
+ command_line.GetArgs()[0] == about_blank_url) {
tapted 2014/05/13 06:47:04 Seems unfair to disallow any packaged app from ope
benwells 2014/05/13 11:41:55 Done.
LaunchPlatformAppWithNoData(profile, extension);
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698