| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // Derives the new command line from |base_command_line| by doing the following: | 62 // Derives the new command line from |base_command_line| by doing the following: |
| 63 // - Forward a given switches list to new command; | 63 // - Forward a given switches list to new command; |
| 64 // - Set start url if given; | 64 // - Set start url if given; |
| 65 // - Append/override switches using |new_switches|; | 65 // - Append/override switches using |new_switches|; |
| 66 std::string DeriveCommandLine(const GURL& start_url, | 66 std::string DeriveCommandLine(const GURL& start_url, |
| 67 const CommandLine& base_command_line, | 67 const CommandLine& base_command_line, |
| 68 const base::DictionaryValue& new_switches, | 68 const base::DictionaryValue& new_switches, |
| 69 CommandLine* command_line) { | 69 CommandLine* command_line) { |
| 70 DCHECK_NE(&base_command_line, command_line); | 70 DCHECK_NE(&base_command_line, command_line); |
| 71 | 71 |
| 72 static const char* kForwardSwitches[] = { | 72 static const char* const kForwardSwitches[] = { |
| 73 ::switches::kDisableAccelerated2dCanvas, | 73 ::switches::kDisableAccelerated2dCanvas, |
| 74 ::switches::kDisableAcceleratedVideoDecode, | 74 ::switches::kDisableAcceleratedVideoDecode, |
| 75 ::switches::kDisableDelegatedRenderer, | 75 ::switches::kDisableDelegatedRenderer, |
| 76 ::switches::kDisableDistanceFieldText, | 76 ::switches::kDisableDistanceFieldText, |
| 77 ::switches::kDisableGpu, | 77 ::switches::kDisableGpu, |
| 78 ::switches::kDisableGpuShaderDiskCache, | 78 ::switches::kDisableGpuShaderDiskCache, |
| 79 ::switches::kDisableGpuWatchdog, | 79 ::switches::kDisableGpuWatchdog, |
| 80 ::switches::kDisableGpuCompositing, | 80 ::switches::kDisableGpuCompositing, |
| 81 ::switches::kDisableGpuRasterization, | 81 ::switches::kDisableGpuRasterization, |
| 82 ::switches::kDisableImplSidePainting, | 82 ::switches::kDisableImplSidePainting, |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 // Relaunch chrome without session manager on dev box. | 371 // Relaunch chrome without session manager on dev box. |
| 372 ReLaunch(command_line); | 372 ReLaunch(command_line); |
| 373 return; | 373 return; |
| 374 } | 374 } |
| 375 | 375 |
| 376 // ChromeRestartRequest deletes itself after request sent to session manager. | 376 // ChromeRestartRequest deletes itself after request sent to session manager. |
| 377 (new ChromeRestartRequest(command_line))->Start(); | 377 (new ChromeRestartRequest(command_line))->Start(); |
| 378 } | 378 } |
| 379 | 379 |
| 380 } // namespace chromeos | 380 } // namespace chromeos |
| OLD | NEW |