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

Unified Diff: trunk/src/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js

Issue 23600025: Revert 222235 ""Redirecting URLs to Packaged Apps" implementatio..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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: trunk/src/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js
===================================================================
--- trunk/src/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js (revision 222256)
+++ trunk/src/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js (working copy)
@@ -19,15 +19,8 @@
function(args, dispatch) {
var launchData = args[0];
- if (!launchData) {
- // An onLaunched corresponding to launching directly or from
- // the app launcher or browser.
- dispatch([]);
- return;
- }
-
- if (launchData.items) {
- // An onLaunched corresponding to file_handlers in the app's manifest.
+ if (launchData && typeof launchData.id !== 'undefined') {
+ // new-style dispatch.
var items = []
var numItems = launchData.items.length;
var itemLoaded = function(err, item) {
@@ -54,10 +47,10 @@
itemLoaded(fileError);
});
});
- } else {
- // Default case. This currently covers an onLaunched corresponding to
- // url_handlers in the app's manifest.
+ } else if (launchData) {
dispatch([launchData]);
+ } else {
+ dispatch([]);
}
});

Powered by Google App Engine
This is Rietveld 408576698