| OLD | NEW |
| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 ~ChromeRestartRequest(); | 251 ~ChromeRestartRequest(); |
| 252 | 252 |
| 253 // Starts the request. | 253 // Starts the request. |
| 254 void Start(); | 254 void Start(); |
| 255 | 255 |
| 256 private: | 256 private: |
| 257 // Fires job restart request to session manager. | 257 // Fires job restart request to session manager. |
| 258 void RestartJob(); | 258 void RestartJob(); |
| 259 | 259 |
| 260 const std::vector<std::string> argv_; | 260 const std::vector<std::string> argv_; |
| 261 base::OneShotTimer<ChromeRestartRequest> timer_; | 261 base::OneShotTimer timer_; |
| 262 | 262 |
| 263 DISALLOW_COPY_AND_ASSIGN(ChromeRestartRequest); | 263 DISALLOW_COPY_AND_ASSIGN(ChromeRestartRequest); |
| 264 }; | 264 }; |
| 265 | 265 |
| 266 ChromeRestartRequest::ChromeRestartRequest(const std::vector<std::string>& argv) | 266 ChromeRestartRequest::ChromeRestartRequest(const std::vector<std::string>& argv) |
| 267 : argv_(argv) {} | 267 : argv_(argv) {} |
| 268 | 268 |
| 269 ChromeRestartRequest::~ChromeRestartRequest() {} | 269 ChromeRestartRequest::~ChromeRestartRequest() {} |
| 270 | 270 |
| 271 void ChromeRestartRequest::Start() { | 271 void ChromeRestartRequest::Start() { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 // Relaunch chrome without session manager on dev box. | 349 // Relaunch chrome without session manager on dev box. |
| 350 ReLaunch(command_line); | 350 ReLaunch(command_line); |
| 351 return; | 351 return; |
| 352 } | 352 } |
| 353 | 353 |
| 354 // ChromeRestartRequest deletes itself after request sent to session manager. | 354 // ChromeRestartRequest deletes itself after request sent to session manager. |
| 355 (new ChromeRestartRequest(command_line.argv()))->Start(); | 355 (new ChromeRestartRequest(command_line.argv()))->Start(); |
| 356 } | 356 } |
| 357 | 357 |
| 358 } // namespace chromeos | 358 } // namespace chromeos |
| OLD | NEW |