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