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

Side by Side Diff: shell/command_line_util.cc

Issue 1045893004: Remove is_win/OS_WIN checks in shell code (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « shell/child_process_host.cc ('k') | shell/domain_socket/net_errors.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "shell/command_line_util.h" 5 #include "shell/command_line_util.h"
6 6
7 #include <functional> 7 #include <functional>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 void ApplyApplicationArgs(Context* context, const std::string& args) { 67 void ApplyApplicationArgs(Context* context, const std::string& args) {
68 std::string args_for_value; 68 std::string args_for_value;
69 if (ParseArgsFor(args, &args_for_value)) 69 if (ParseArgsFor(args, &args_for_value))
70 GetAppURLAndSetArgs(args_for_value, context); 70 GetAppURLAndSetArgs(args_for_value, context);
71 } 71 }
72 72
73 void RunCommandLineApps(Context* context) { 73 void RunCommandLineApps(Context* context) {
74 const auto& command_line = *base::CommandLine::ForCurrentProcess(); 74 const auto& command_line = *base::CommandLine::ForCurrentProcess();
75 for (const auto& arg : command_line.GetArgs()) { 75 for (const auto& arg : command_line.GetArgs()) {
76 std::string arg2; 76 GURL url = GetAppURLAndSetArgs(arg, context);
77 #if defined(OS_WIN)
78 arg2 = base::UTF16ToUTF8(arg);
79 #else
80 arg2 = arg;
81 #endif
82 GURL url = GetAppURLAndSetArgs(arg2, context);
83 if (!url.is_valid()) 77 if (!url.is_valid())
84 return; 78 return;
85 context->Run(url); 79 context->Run(url);
86 } 80 }
87 } 81 }
88 82
89 } // namespace shell 83 } // namespace shell
90 } // namespace mojo 84 } // namespace mojo
OLDNEW
« no previous file with comments | « shell/child_process_host.cc ('k') | shell/domain_socket/net_errors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698