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

Side by Side Diff: chrome/browser/chromeos/login/chrome_restart_request.cc

Issue 1240183002: Update SplitString calls in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "chrome/browser/chromeos/login/chrome_restart_request.h" 5 #include "chrome/browser/chromeos/login/chrome_restart_request.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 base_command_line.GetSwitchValueNative( 250 base_command_line.GetSwitchValueNative(
251 ::switches::kRegisterPepperPlugins).c_str()); 251 ::switches::kRegisterPepperPlugins).c_str());
252 } 252 }
253 253
254 return cmd_line_str; 254 return cmd_line_str;
255 } 255 }
256 256
257 // Simulates a session manager restart by launching give command line 257 // Simulates a session manager restart by launching give command line
258 // and exit current process. 258 // and exit current process.
259 void ReLaunch(const std::string& command_line) { 259 void ReLaunch(const std::string& command_line) {
260 std::vector<std::string> argv;
261
262 // This is not a proper way to get |argv| but it's good enough for debugging. 260 // This is not a proper way to get |argv| but it's good enough for debugging.
263 base::SplitString(command_line, ' ', &argv); 261 std::vector<std::string> argv = base::SplitString(
262 command_line, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
264 263
265 base::LaunchProcess(argv, base::LaunchOptions()); 264 base::LaunchProcess(argv, base::LaunchOptions());
266 chrome::AttemptUserExit(); 265 chrome::AttemptUserExit();
267 } 266 }
268 267
269 // Empty function that run by the local state task runner to ensure last 268 // Empty function that run by the local state task runner to ensure last
270 // commit goes through. 269 // commit goes through.
271 void EnsureLocalStateIsWritten() {} 270 void EnsureLocalStateIsWritten() {}
272 271
273 // Wraps the work of sending chrome restart request to session manager. 272 // Wraps the work of sending chrome restart request to session manager.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 // Relaunch chrome without session manager on dev box. 384 // Relaunch chrome without session manager on dev box.
386 ReLaunch(command_line); 385 ReLaunch(command_line);
387 return; 386 return;
388 } 387 }
389 388
390 // ChromeRestartRequest deletes itself after request sent to session manager. 389 // ChromeRestartRequest deletes itself after request sent to session manager.
391 (new ChromeRestartRequest(command_line))->Start(); 390 (new ChromeRestartRequest(command_line))->Start();
392 } 391 }
393 392
394 } // namespace chromeos 393 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_syncer.cc ('k') | chrome/browser/chromeos/login/language_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698