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

Unified Diff: chrome/app/mash/mash_runner.cc

Issue 2681663004: Mustash: Ignore --mash flag when comparing flags in UserSessionManager. (Closed)
Patch Set: Addressing feedback Created 3 years, 10 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
« no previous file with comments | « chrome/app/mash/DEPS ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/mash/mash_runner.cc
diff --git a/chrome/app/mash/mash_runner.cc b/chrome/app/mash/mash_runner.cc
index e05f7ecf9dc7394c072c0346d9d9f0c514764425..c5297bdc78596ed52aff89e597c3647100ee080a 100644
--- a/chrome/app/mash/mash_runner.cc
+++ b/chrome/app/mash/mash_runner.cc
@@ -28,6 +28,7 @@
#include "base/threading/thread.h"
#include "base/trace_event/trace_event.h"
#include "chrome/app/mash/chrome_mash_catalog.h"
+#include "chrome/common/chrome_switches.h"
#include "components/tracing/common/trace_to_console.h"
#include "components/tracing/common/tracing_switches.h"
#include "content/public/common/content_switches.h"
@@ -116,13 +117,12 @@ class ServiceProcessLauncherDelegateImpl
// When launching the browser process, ensure that we don't inherit the
// --mash flag so it proceeds with the normal content/browser startup path.
- // Eliminate all copies in case the developer passed more than one.
- base::CommandLine::StringVector new_argv;
- for (const base::CommandLine::StringType& arg : command_line->argv()) {
- if (arg != FILE_PATH_LITERAL("--mash"))
- new_argv.push_back(arg);
- }
- *command_line = base::CommandLine(new_argv);
+ base::CommandLine::SwitchMap new_switches = command_line->GetSwitches();
+ new_switches.erase(switches::kMash);
+ *command_line = base::CommandLine(command_line->GetProgram());
+ for (const std::pair<std::string, base::CommandLine::StringType>& sw :
+ new_switches)
sky 2017/02/09 17:20:48 {}
mfomitchev 2017/02/09 20:28:21 Done.
+ command_line->AppendSwitchNative(sw.first, sw.second);
}
DISALLOW_COPY_AND_ASSIGN(ServiceProcessLauncherDelegateImpl);
« no previous file with comments | « chrome/app/mash/DEPS ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698