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

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

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixwindowslink+rebase Created 5 years, 3 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698