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

Unified Diff: apps/launcher.cc

Issue 114263005: Convert Extension* to extension id in AppLaunchParams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile Created 7 years 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
« no previous file with comments | « apps/launcher.h ('k') | chrome/browser/apps/app_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/launcher.cc
diff --git a/apps/launcher.cc b/apps/launcher.cc
index f8f00517d708dd41cc48835893e8e7bbce676ea0..6b077dd4c5a51dc150a740b1cc1cea54a3b408df 100644
--- a/apps/launcher.cc
+++ b/apps/launcher.cc
@@ -83,13 +83,13 @@ bool MakePathAbsolute(const base::FilePath& current_directory,
return true;
}
-bool GetAbsolutePathFromCommandLine(const CommandLine* command_line,
+bool GetAbsolutePathFromCommandLine(const CommandLine& command_line,
const base::FilePath& current_directory,
base::FilePath* path) {
- if (!command_line || !command_line->GetArgs().size())
+ if (!command_line.GetArgs().size())
return false;
- base::FilePath relative_path(command_line->GetArgs()[0]);
+ base::FilePath relative_path(command_line.GetArgs()[0]);
base::FilePath absolute_path(relative_path);
if (!MakePathAbsolute(current_directory, &absolute_path)) {
LOG(WARNING) << "Cannot make absolute path from " << relative_path.value();
@@ -312,7 +312,7 @@ class PlatformAppPathLauncher
void LaunchPlatformAppWithCommandLine(Profile* profile,
const Extension* extension,
- const CommandLine* command_line,
+ const CommandLine& command_line,
const base::FilePath& current_directory) {
if (!AppsClient::Get()->CheckAppLaunch(profile, extension))
return;
@@ -356,7 +356,10 @@ void LaunchPlatformAppWithPath(Profile* profile,
}
void LaunchPlatformApp(Profile* profile, const Extension* extension) {
- LaunchPlatformAppWithCommandLine(profile, extension, NULL, base::FilePath());
+ LaunchPlatformAppWithCommandLine(profile,
+ extension,
+ CommandLine(CommandLine::NO_PROGRAM),
+ base::FilePath());
}
void LaunchPlatformAppWithFileHandler(Profile* profile,
« no previous file with comments | « apps/launcher.h ('k') | chrome/browser/apps/app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698