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

Unified Diff: chrome/browser/ui/extensions/app_launch_params.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/extensions/app_launch_params.cc
diff --git a/chrome/browser/ui/extensions/app_launch_params.cc b/chrome/browser/ui/extensions/app_launch_params.cc
index fdb6a9f1e331be798eb8b3690320c0b48b582b2e..fd0bc087c35ef71d5e80de37f07d9d1b53ee9bcd 100644
--- a/chrome/browser/ui/extensions/app_launch_params.cc
+++ b/chrome/browser/ui/extensions/app_launch_params.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/extensions/launch_util.h"
#include "chrome/browser/profiles/profile.h"
#include "extensions/browser/extension_prefs.h"
+#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
using extensions::ExtensionPrefs;
@@ -14,7 +15,8 @@ using extensions::ExtensionPrefs;
AppLaunchParams::AppLaunchParams(Profile* profile,
const extensions::Extension* extension,
extensions::LaunchContainer container,
- WindowOpenDisposition disposition)
+ WindowOpenDisposition disposition,
+ extensions::AppLaunchSource source)
: profile(profile),
extension_id(extension ? extension->id() : std::string()),
container(container),
@@ -23,12 +25,13 @@ AppLaunchParams::AppLaunchParams(Profile* profile,
override_url(),
override_bounds(),
command_line(CommandLine::NO_PROGRAM),
- source(extensions::SOURCE_UNTRACKED) {
+ source(source) {
}
AppLaunchParams::AppLaunchParams(Profile* profile,
const extensions::Extension* extension,
- WindowOpenDisposition disposition)
+ WindowOpenDisposition disposition,
+ extensions::AppLaunchSource source)
: profile(profile),
extension_id(extension ? extension->id() : std::string()),
container(extensions::LAUNCH_CONTAINER_NONE),
@@ -37,7 +40,7 @@ AppLaunchParams::AppLaunchParams(Profile* profile,
override_url(),
override_bounds(),
command_line(CommandLine::NO_PROGRAM),
- source(extensions::SOURCE_UNTRACKED) {
+ source(source) {
// Look up the app preference to find out the right launch container. Default
// is to launch as a regular tab.
container =
@@ -47,7 +50,8 @@ AppLaunchParams::AppLaunchParams(Profile* profile,
AppLaunchParams::AppLaunchParams(Profile* profile,
const extensions::Extension* extension,
int event_flags,
- chrome::HostDesktopType desktop_type)
+ chrome::HostDesktopType desktop_type,
+ extensions::AppLaunchSource source)
: profile(profile),
extension_id(extension ? extension->id() : std::string()),
container(extensions::LAUNCH_CONTAINER_NONE),
@@ -56,7 +60,7 @@ AppLaunchParams::AppLaunchParams(Profile* profile,
override_url(),
override_bounds(),
command_line(CommandLine::NO_PROGRAM),
- source(extensions::SOURCE_UNTRACKED) {
+ source(source) {
if (disposition == NEW_FOREGROUND_TAB || disposition == NEW_BACKGROUND_TAB) {
container = extensions::LAUNCH_CONTAINER_TAB;
} else if (disposition == NEW_WINDOW) {

Powered by Google App Engine
This is Rietveld 408576698