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

Side by Side Diff: remoting/host/host_main.cc

Issue 121123002: Update uses of UTF conversions in ppapi/, printing/, remoting/, rlz/, sandbox/, skia/, sql/, sync/,… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/host_event_logger_win.cc ('k') | remoting/host/ipc_util_win.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 // This file implements the common entry point shared by all Chromoting Host 5 // This file implements the common entry point shared by all Chromoting Host
6 // processes. 6 // processes.
7 7
8 #include "remoting/host/host_main.h" 8 #include "remoting/host/host_main.h"
9 9
10 #include <string> 10 #include <string>
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 std::string process_type = kProcessTypeHost; 210 std::string process_type = kProcessTypeHost;
211 if (command_line->HasSwitch(kProcessTypeSwitchName)) { 211 if (command_line->HasSwitch(kProcessTypeSwitchName)) {
212 process_type = command_line->GetSwitchValueASCII(kProcessTypeSwitchName); 212 process_type = command_line->GetSwitchValueASCII(kProcessTypeSwitchName);
213 } else { 213 } else {
214 // Assume that it is the native messaging host starting if "--type" is 214 // Assume that it is the native messaging host starting if "--type" is
215 // missing and the first argument looks like an origin that represents 215 // missing and the first argument looks like an origin that represents
216 // an extension. 216 // an extension.
217 CommandLine::StringVector args = command_line->GetArgs(); 217 CommandLine::StringVector args = command_line->GetArgs();
218 if (!args.empty()) { 218 if (!args.empty()) {
219 #if defined(OS_WIN) 219 #if defined(OS_WIN)
220 std::string origin = UTF16ToUTF8(args[0]); 220 std::string origin = base::UTF16ToUTF8(args[0]);
221 #else 221 #else
222 std::string origin = args[0]; 222 std::string origin = args[0];
223 #endif 223 #endif
224 if (StartsWithASCII(origin, kExtensionOriginPrefix, true)) { 224 if (StartsWithASCII(origin, kExtensionOriginPrefix, true)) {
225 process_type = kProcessTypeNativeMessagingHost; 225 process_type = kProcessTypeNativeMessagingHost;
226 } 226 }
227 } 227 }
228 } 228 }
229 229
230 MainRoutineFn main_routine = SelectMainRoutine(process_type); 230 MainRoutineFn main_routine = SelectMainRoutine(process_type);
(...skipping 11 matching lines...) Expand all
242 if (exit_code == kUsageExitCode) { 242 if (exit_code == kUsageExitCode) {
243 Usage(command_line->GetProgram()); 243 Usage(command_line->GetProgram());
244 } 244 }
245 245
246 remoting::UnloadResources(); 246 remoting::UnloadResources();
247 247
248 return exit_code; 248 return exit_code;
249 } 249 }
250 250
251 } // namespace remoting 251 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/host_event_logger_win.cc ('k') | remoting/host/ipc_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698