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

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

Issue 23904025: Move IsRunningOnChromeOS to SysInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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 | Annotate | Revision Log
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/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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 349
350 void RestartChrome(const std::string& command_line) { 350 void RestartChrome(const std::string& command_line) {
351 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 351 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
352 352
353 static bool restart_requested = false; 353 static bool restart_requested = false;
354 if (restart_requested) { 354 if (restart_requested) {
355 NOTREACHED() << "Request chrome restart for more than once."; 355 NOTREACHED() << "Request chrome restart for more than once.";
356 } 356 }
357 restart_requested = true; 357 restart_requested = true;
358 358
359 if (!base::chromeos::IsRunningOnChromeOS()) { 359 if (!base::SysInfo::IsRunningOnChromeOS()) {
360 // Relaunch chrome without session manager on dev box. 360 // Relaunch chrome without session manager on dev box.
361 ReLaunch(command_line); 361 ReLaunch(command_line);
362 return; 362 return;
363 } 363 }
364 364
365 // ChromeRestartRequest deletes itself after request sent to session manager. 365 // ChromeRestartRequest deletes itself after request sent to session manager.
366 (new ChromeRestartRequest(command_line))->Start(); 366 (new ChromeRestartRequest(command_line))->Start();
367 } 367 }
368 368
369 } // namespace chromeos 369 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698