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