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

Unified Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 657023008: Add a new field "source" in launchData of chrome.app.runtime.onLaunched() to trace launch source. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 6 years, 1 month 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/webui/ntp/app_launcher_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index b4375a22bd8d107e278ffd461a920a2c3d3c71ec..d3bef85e15667ce289855cd3c7fc79bbf5b1d839 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -526,6 +526,7 @@ void AppLauncherHandler::HandleLaunchApp(const base::ListValue* args) {
extensions::LAUNCH_CONTAINER_TAB,
disposition);
params.override_url = GURL(url);
+ params.source = extensions::SOURCE_NEW_TAB_PAGE;
OpenApplication(params);
} else {
// To give a more "launchy" experience when using the NTP launcher, we close
@@ -539,6 +540,7 @@ void AppLauncherHandler::HandleLaunchApp(const base::ListValue* args) {
AppLaunchParams params(profile, extension,
old_contents ? CURRENT_TAB : NEW_FOREGROUND_TAB);
params.override_url = GURL(url);
+ params.source = extensions::SOURCE_NEW_TAB_PAGE;
WebContents* new_contents = OpenApplication(params);
// This will also destroy the handler, so do not perform any actions after.
« no previous file with comments | « chrome/browser/ui/extensions/application_launch.cc ('k') | extensions/browser/api/app_runtime/app_runtime_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698