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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 722703002: Make "source" a required argument of AppLaunchParams and fill in the argument in all call points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/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 0d81c8f1cf93e121b3ce7674c40e9a4df2421175..04a110924b43ae4b9fca714a2b1b398b288d6d2d 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -56,6 +56,7 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/extensions/app_launch_params.h"
#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/browser/ui/extensions/extension_enable_flow.h"
#include "chrome/browser/ui/host_desktop.h"
@@ -85,6 +86,7 @@
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/window_open_disposition.h"
#include "ui/keyboard/keyboard_util.h"
#include "ui/resources/grit/ui_resources.h"
#include "ui/wm/core/window_animations.h"
@@ -734,10 +736,9 @@ void ChromeLauncherController::LaunchApp(const std::string& app_id,
#endif
// The app will be created for the currently active profile.
- AppLaunchParams params(profile_,
- extension,
- event_flags,
- chrome::HOST_DESKTOP_TYPE_ASH);
+ AppLaunchParams params(
+ profile_, extension, ui::DispositionFromEventFlags(event_flags),
+ chrome::HOST_DESKTOP_TYPE_ASH, extensions::SOURCE_APP_LAUNCHER);
if (source != ash::LAUNCH_FROM_UNKNOWN &&
app_id == extensions::kWebStoreAppId) {
// Get the corresponding source string.
@@ -749,10 +750,6 @@ void ChromeLauncherController::LaunchApp(const std::string& app_id,
extension_url, extension_urls::kWebstoreSourceField, source_value);
}
- params.source = (source == ash::LAUNCH_FROM_UNKNOWN)
- ? extensions::SOURCE_UNTRACKED
- : extensions::SOURCE_APP_LAUNCHER;
-
OpenApplication(params);
}

Powered by Google App Engine
This is Rietveld 408576698