Index: chrome/browser/extensions/api/app_window/app_window_api.cc |
diff --git a/chrome/browser/extensions/api/app_window/app_window_api.cc b/chrome/browser/extensions/api/app_window/app_window_api.cc |
index c6623e0532280417d43dfa9d36bc177cafa3a36b..42740736c18719f3569a52c7e92e416ae099be69 100644 |
--- a/chrome/browser/extensions/api/app_window/app_window_api.cc |
+++ b/chrome/browser/extensions/api/app_window/app_window_api.cc |
@@ -158,6 +158,13 @@ bool AppWindowCreateFunction::RunAsync() { |
url = absolute; |
} |
+ // Show warning when url passed isn't local |
+ if (GURL(params->url).has_scheme()) { |
+ WriteToConsole(content::CONSOLE_MESSAGE_LEVEL_WARNING, |
benwells
2014/06/18 03:22:17
Errors from APIs are generally communicated via ch
Nikhil
2014/06/18 08:52:39
Done.
|
+ "Url passed as parameter to chrome.app.window.create() " |
+ "should be local for security reasons."); |
+ } |
+ |
// TODO(jeremya): figure out a way to pass the opening WebContents through to |
// AppWindow::Create so we can set the opener at create time rather than |
// with a hack in AppWindowCustomBindings::GetView(). |