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/chromeos/chromeos_version.h" | |
11 #include "base/command_line.h" | 10 #include "base/command_line.h" |
12 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
13 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
14 #include "base/path_service.h" | 13 #include "base/path_service.h" |
15 #include "base/prefs/json_pref_store.h" | 14 #include "base/prefs/json_pref_store.h" |
16 #include "base/prefs/pref_service.h" | 15 #include "base/prefs/pref_service.h" |
17 #include "base/process/launch.h" | 16 #include "base/process/launch.h" |
18 #include "base/strings/string_split.h" | 17 #include "base/strings/string_split.h" |
19 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
| 19 #include "base/sys_info.h" |
20 #include "base/timer/timer.h" | 20 #include "base/timer/timer.h" |
21 #include "base/values.h" | 21 #include "base/values.h" |
22 #include "cc/base/switches.h" | 22 #include "cc/base/switches.h" |
23 #include "chrome/browser/browser_process.h" | 23 #include "chrome/browser/browser_process.h" |
24 #include "chrome/browser/chromeos/login/user_manager.h" | 24 #include "chrome/browser/chromeos/login/user_manager.h" |
25 #include "chrome/browser/lifetime/application_lifetime.h" | 25 #include "chrome/browser/lifetime/application_lifetime.h" |
26 #include "chrome/common/chrome_constants.h" | 26 #include "chrome/common/chrome_constants.h" |
27 #include "chrome/common/chrome_paths.h" | 27 #include "chrome/common/chrome_paths.h" |
28 #include "chrome/common/chrome_switches.h" | 28 #include "chrome/common/chrome_switches.h" |
29 #include "chrome/common/url_constants.h" | 29 #include "chrome/common/url_constants.h" |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 | 351 |
352 void RestartChrome(const std::string& command_line) { | 352 void RestartChrome(const std::string& command_line) { |
353 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 353 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
354 | 354 |
355 static bool restart_requested = false; | 355 static bool restart_requested = false; |
356 if (restart_requested) { | 356 if (restart_requested) { |
357 NOTREACHED() << "Request chrome restart for more than once."; | 357 NOTREACHED() << "Request chrome restart for more than once."; |
358 } | 358 } |
359 restart_requested = true; | 359 restart_requested = true; |
360 | 360 |
361 if (!base::chromeos::IsRunningOnChromeOS()) { | 361 if (!base::SysInfo::IsRunningOnChromeOS()) { |
362 // Relaunch chrome without session manager on dev box. | 362 // Relaunch chrome without session manager on dev box. |
363 ReLaunch(command_line); | 363 ReLaunch(command_line); |
364 return; | 364 return; |
365 } | 365 } |
366 | 366 |
367 // ChromeRestartRequest deletes itself after request sent to session manager. | 367 // ChromeRestartRequest deletes itself after request sent to session manager. |
368 (new ChromeRestartRequest(command_line))->Start(); | 368 (new ChromeRestartRequest(command_line))->Start(); |
369 } | 369 } |
370 | 370 |
371 } // namespace chromeos | 371 } // namespace chromeos |
OLD | NEW |