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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.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: Created 6 years, 2 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/ash/launcher/chrome_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index 34a8f6aa91c9ac293cdb485e08d9d6235ad3076b..3197ea073a5b9dcac243ddccc35631b1e5888088 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -739,6 +739,10 @@ void ChromeLauncherController::LaunchApp(const std::string& app_id,
extension_url, extension_urls::kWebstoreSourceField, source_value);
}
+ params.source = (source == ash::LAUNCH_FROM_UNKNOWN)
+ ? extensions::SOURCE_UNKNOWN
+ : extensions::SOURCE_APP_LAUNCHER;
+
OpenApplication(params);
}
@@ -1756,7 +1760,7 @@ void ChromeLauncherController::SetVirtualKeyboardBehaviorFromPrefs() {
else if (is_enabled && !was_enabled)
ash::Shell::GetInstance()->CreateKeyboard();
}
-#endif // defined(OS_CHROMEOS)
+#endif // defined(OS_CHROMEOS)
ash::ShelfItemStatus ChromeLauncherController::GetAppState(
const std::string& app_id) {

Powered by Google App Engine
This is Rietveld 408576698