| 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" | 10 #include "base/chromeos/chromeos_version.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 ::switches::kDisableGestureTapHighlight, | 90 ::switches::kDisableGestureTapHighlight, |
| 91 ::switches::kEnableLogging, | 91 ::switches::kEnableLogging, |
| 92 ::switches::kEnablePinch, | 92 ::switches::kEnablePinch, |
| 93 ::switches::kEnableThreadedCompositing, | 93 ::switches::kEnableThreadedCompositing, |
| 94 ::switches::kEnableViewport, | 94 ::switches::kEnableViewport, |
| 95 ::switches::kEnableVsyncNotification, | 95 ::switches::kEnableVsyncNotification, |
| 96 ::switches::kForceDeviceScaleFactor, | 96 ::switches::kForceDeviceScaleFactor, |
| 97 ::switches::kGpuStartupDialog, | 97 ::switches::kGpuStartupDialog, |
| 98 ::switches::kHasChromeOSDiamondKey, | 98 ::switches::kHasChromeOSDiamondKey, |
| 99 ::switches::kHasChromeOSKeyboard, | 99 ::switches::kHasChromeOSKeyboard, |
| 100 ::switches::kLoginProfile, | |
| 101 ::switches::kNaturalScrollDefault, | 100 ::switches::kNaturalScrollDefault, |
| 102 ::switches::kNoSandbox, | 101 ::switches::kNoSandbox, |
| 103 ::switches::kPpapiFlashArgs, | 102 ::switches::kPpapiFlashArgs, |
| 104 ::switches::kPpapiFlashInProcess, | 103 ::switches::kPpapiFlashInProcess, |
| 105 ::switches::kPpapiFlashPath, | 104 ::switches::kPpapiFlashPath, |
| 106 ::switches::kPpapiFlashVersion, | 105 ::switches::kPpapiFlashVersion, |
| 107 ::switches::kPpapiInProcess, | 106 ::switches::kPpapiInProcess, |
| 108 ::switches::kRendererStartupDialog, | 107 ::switches::kRendererStartupDialog, |
| 109 #if defined(USE_XI2_MT) | 108 #if defined(USE_XI2_MT) |
| 110 ::switches::kTouchCalibration, | 109 ::switches::kTouchCalibration, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 cc::switches::kShowPropertyChangedRects, | 153 cc::switches::kShowPropertyChangedRects, |
| 155 cc::switches::kShowReplicaScreenSpaceRects, | 154 cc::switches::kShowReplicaScreenSpaceRects, |
| 156 cc::switches::kShowScreenSpaceRects, | 155 cc::switches::kShowScreenSpaceRects, |
| 157 cc::switches::kShowSurfaceDamageRects, | 156 cc::switches::kShowSurfaceDamageRects, |
| 158 cc::switches::kSlowDownRasterScaleFactor, | 157 cc::switches::kSlowDownRasterScaleFactor, |
| 159 cc::switches::kTraceAllRenderedFrames, | 158 cc::switches::kTraceAllRenderedFrames, |
| 160 cc::switches::kTraceOverdraw, | 159 cc::switches::kTraceOverdraw, |
| 161 cc::switches::kUIEnablePartialSwap, | 160 cc::switches::kUIEnablePartialSwap, |
| 162 cc::switches::kUIEnablePerTilePainting, | 161 cc::switches::kUIEnablePerTilePainting, |
| 163 chromeos::switches::kDbusStub, | 162 chromeos::switches::kDbusStub, |
| 163 chromeos::switches::kLoginProfile, |
| 164 gfx::switches::kEnableBrowserTextSubpixelPositioning, | 164 gfx::switches::kEnableBrowserTextSubpixelPositioning, |
| 165 gfx::switches::kEnableWebkitTextSubpixelPositioning, | 165 gfx::switches::kEnableWebkitTextSubpixelPositioning, |
| 166 views::corewm::switches::kNoDropShadows, | 166 views::corewm::switches::kNoDropShadows, |
| 167 views::corewm::switches::kWindowAnimationsDisabled, | 167 views::corewm::switches::kWindowAnimationsDisabled, |
| 168 }; | 168 }; |
| 169 command_line->CopySwitchesFrom(base_command_line, | 169 command_line->CopySwitchesFrom(base_command_line, |
| 170 kForwardSwitches, | 170 kForwardSwitches, |
| 171 arraysize(kForwardSwitches)); | 171 arraysize(kForwardSwitches)); |
| 172 | 172 |
| 173 if (start_url.is_valid()) | 173 if (start_url.is_valid()) |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 delete this; | 293 delete this; |
| 294 } | 294 } |
| 295 | 295 |
| 296 } // namespace | 296 } // namespace |
| 297 | 297 |
| 298 std::string GetOffTheRecordCommandLine( | 298 std::string GetOffTheRecordCommandLine( |
| 299 const GURL& start_url, | 299 const GURL& start_url, |
| 300 const CommandLine& base_command_line, | 300 const CommandLine& base_command_line, |
| 301 CommandLine* command_line) { | 301 CommandLine* command_line) { |
| 302 base::DictionaryValue otr_switches; | 302 base::DictionaryValue otr_switches; |
| 303 otr_switches.SetString(::switches::kGuestSession, std::string()); | 303 otr_switches.SetString(switches::kGuestSession, std::string()); |
| 304 otr_switches.SetString(::switches::kIncognito, std::string()); | 304 otr_switches.SetString(::switches::kIncognito, std::string()); |
| 305 otr_switches.SetString(::switches::kLoggingLevel, kGuestModeLoggingLevel); | 305 otr_switches.SetString(::switches::kLoggingLevel, kGuestModeLoggingLevel); |
| 306 otr_switches.SetString(::switches::kLoginUser, kGuestUserName); | 306 otr_switches.SetString(switches::kLoginUser, kGuestUserName); |
| 307 | 307 |
| 308 // Override the home page. | 308 // Override the home page. |
| 309 otr_switches.SetString(::switches::kHomePage, | 309 otr_switches.SetString(::switches::kHomePage, |
| 310 GURL(chrome::kChromeUINewTabURL).spec()); | 310 GURL(chrome::kChromeUINewTabURL).spec()); |
| 311 | 311 |
| 312 return DeriveCommandLine(start_url, | 312 return DeriveCommandLine(start_url, |
| 313 base_command_line, | 313 base_command_line, |
| 314 otr_switches, | 314 otr_switches, |
| 315 command_line); | 315 command_line); |
| 316 } | 316 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 328 // Relaunch chrome without session manager on dev box. | 328 // Relaunch chrome without session manager on dev box. |
| 329 ReLaunch(command_line); | 329 ReLaunch(command_line); |
| 330 return; | 330 return; |
| 331 } | 331 } |
| 332 | 332 |
| 333 // ChromeRestartRequest deletes itself after request sent to session manager. | 333 // ChromeRestartRequest deletes itself after request sent to session manager. |
| 334 (new ChromeRestartRequest(command_line))->Start(); | 334 (new ChromeRestartRequest(command_line))->Start(); |
| 335 } | 335 } |
| 336 | 336 |
| 337 } // namespace chromeos | 337 } // namespace chromeos |
| OLD | NEW |