| 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 12 matching lines...) Expand all Loading... |
| 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" |
| 30 #include "chromeos/chromeos_switches.h" | 30 #include "chromeos/chromeos_switches.h" |
| 31 #include "chromeos/dbus/dbus_thread_manager.h" | 31 #include "chromeos/dbus/dbus_thread_manager.h" |
| 32 #include "chromeos/dbus/session_manager_client.h" | 32 #include "chromeos/dbus/session_manager_client.h" |
| 33 #include "components/policy/core/common/policy_switches.h" |
| 33 #include "content/public/browser/browser_thread.h" | 34 #include "content/public/browser/browser_thread.h" |
| 34 #include "content/public/common/content_switches.h" | 35 #include "content/public/common/content_switches.h" |
| 35 #include "gpu/command_buffer/service/gpu_switches.h" | 36 #include "gpu/command_buffer/service/gpu_switches.h" |
| 36 #include "media/base/media_switches.h" | 37 #include "media/base/media_switches.h" |
| 37 #include "ui/base/ui_base_switches.h" | 38 #include "ui/base/ui_base_switches.h" |
| 38 #include "ui/compositor/compositor_switches.h" | 39 #include "ui/compositor/compositor_switches.h" |
| 39 #include "ui/events/event_switches.h" | 40 #include "ui/events/event_switches.h" |
| 40 #include "ui/gfx/switches.h" | 41 #include "ui/gfx/switches.h" |
| 41 #include "ui/gl/gl_switches.h" | 42 #include "ui/gl/gl_switches.h" |
| 42 #include "ui/views/corewm/corewm_switches.h" | 43 #include "ui/views/corewm/corewm_switches.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 59 // - Set start url if given; | 60 // - Set start url if given; |
| 60 // - Append/override switches using |new_switches|; | 61 // - Append/override switches using |new_switches|; |
| 61 std::string DeriveCommandLine(const GURL& start_url, | 62 std::string DeriveCommandLine(const GURL& start_url, |
| 62 const CommandLine& base_command_line, | 63 const CommandLine& base_command_line, |
| 63 const base::DictionaryValue& new_switches, | 64 const base::DictionaryValue& new_switches, |
| 64 CommandLine* command_line) { | 65 CommandLine* command_line) { |
| 65 DCHECK_NE(&base_command_line, command_line); | 66 DCHECK_NE(&base_command_line, command_line); |
| 66 | 67 |
| 67 static const char* kForwardSwitches[] = { | 68 static const char* kForwardSwitches[] = { |
| 68 ::switches::kAllowWebUICompositing, | 69 ::switches::kAllowWebUICompositing, |
| 69 ::switches::kDeviceManagementUrl, | |
| 70 ::switches::kDisableAccelerated2dCanvas, | 70 ::switches::kDisableAccelerated2dCanvas, |
| 71 ::switches::kDisableAcceleratedOverflowScroll, | 71 ::switches::kDisableAcceleratedOverflowScroll, |
| 72 ::switches::kDisableAcceleratedPlugins, | 72 ::switches::kDisableAcceleratedPlugins, |
| 73 ::switches::kDisableAcceleratedVideoDecode, | 73 ::switches::kDisableAcceleratedVideoDecode, |
| 74 ::switches::kDisableBrowserPluginCompositing, | 74 ::switches::kDisableBrowserPluginCompositing, |
| 75 ::switches::kDisableDeadlineScheduling, | 75 ::switches::kDisableDeadlineScheduling, |
| 76 ::switches::kDisableDelegatedRenderer, | 76 ::switches::kDisableDelegatedRenderer, |
| 77 ::switches::kDisableFiltersOverIPC, | 77 ::switches::kDisableFiltersOverIPC, |
| 78 ::switches::kDisableForceCompositingMode, | 78 ::switches::kDisableForceCompositingMode, |
| 79 ::switches::kDisableGpuShaderDiskCache, | 79 ::switches::kDisableGpuShaderDiskCache, |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 chromeos::switches::kDbusStub, | 198 chromeos::switches::kDbusStub, |
| 199 chromeos::switches::kDisableLoginAnimations, | 199 chromeos::switches::kDisableLoginAnimations, |
| 200 chromeos::switches::kDisableOobeAnimation, | 200 chromeos::switches::kDisableOobeAnimation, |
| 201 chromeos::switches::kGpuSandboxFailuresNonfatal, | 201 chromeos::switches::kGpuSandboxFailuresNonfatal, |
| 202 chromeos::switches::kHasChromeOSDiamondKey, | 202 chromeos::switches::kHasChromeOSDiamondKey, |
| 203 chromeos::switches::kHasChromeOSKeyboard, | 203 chromeos::switches::kHasChromeOSKeyboard, |
| 204 chromeos::switches::kLoginProfile, | 204 chromeos::switches::kLoginProfile, |
| 205 chromeos::switches::kNaturalScrollDefault, | 205 chromeos::switches::kNaturalScrollDefault, |
| 206 ::switches::kEnableBrowserTextSubpixelPositioning, | 206 ::switches::kEnableBrowserTextSubpixelPositioning, |
| 207 ::switches::kEnableWebkitTextSubpixelPositioning, | 207 ::switches::kEnableWebkitTextSubpixelPositioning, |
| 208 policy::switches::kDeviceManagementUrl, |
| 208 views::corewm::switches::kNoDropShadows, | 209 views::corewm::switches::kNoDropShadows, |
| 209 views::corewm::switches::kWindowAnimationsDisabled, | 210 views::corewm::switches::kWindowAnimationsDisabled, |
| 210 }; | 211 }; |
| 211 command_line->CopySwitchesFrom(base_command_line, | 212 command_line->CopySwitchesFrom(base_command_line, |
| 212 kForwardSwitches, | 213 kForwardSwitches, |
| 213 arraysize(kForwardSwitches)); | 214 arraysize(kForwardSwitches)); |
| 214 | 215 |
| 215 if (start_url.is_valid()) | 216 if (start_url.is_valid()) |
| 216 command_line->AppendArg(start_url.spec()); | 217 command_line->AppendArg(start_url.spec()); |
| 217 | 218 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 // Relaunch chrome without session manager on dev box. | 371 // Relaunch chrome without session manager on dev box. |
| 371 ReLaunch(command_line); | 372 ReLaunch(command_line); |
| 372 return; | 373 return; |
| 373 } | 374 } |
| 374 | 375 |
| 375 // ChromeRestartRequest deletes itself after request sent to session manager. | 376 // ChromeRestartRequest deletes itself after request sent to session manager. |
| 376 (new ChromeRestartRequest(command_line))->Start(); | 377 (new ChromeRestartRequest(command_line))->Start(); |
| 377 } | 378 } |
| 378 | 379 |
| 379 } // namespace chromeos | 380 } // namespace chromeos |
| OLD | NEW |