| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "cloud_print/service/win/chrome_launcher.h" | 5 #include "cloud_print/service/win/chrome_launcher.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 207 |
| 208 if (!chrome_path.empty()) { | 208 if (!chrome_path.empty()) { |
| 209 base::CommandLine cmd(chrome_path); | 209 base::CommandLine cmd(chrome_path); |
| 210 CopyChromeSwitchesFromCurrentProcess(&cmd); | 210 CopyChromeSwitchesFromCurrentProcess(&cmd); |
| 211 | 211 |
| 212 // Required switches. | 212 // Required switches. |
| 213 cmd.AppendSwitchASCII(switches::kProcessType, switches::kServiceProcess); | 213 cmd.AppendSwitchASCII(switches::kProcessType, switches::kServiceProcess); |
| 214 cmd.AppendSwitchPath(switches::kUserDataDir, user_data_); | 214 cmd.AppendSwitchPath(switches::kUserDataDir, user_data_); |
| 215 cmd.AppendSwitch(switches::kNoServiceAutorun); | 215 cmd.AppendSwitch(switches::kNoServiceAutorun); |
| 216 | 216 |
| 217 #if defined(OS_WIN) |
| 218 cmd.AppendArg(switches::kPrefetchArgumentOther); |
| 219 #endif // defined(OS_WIN) |
| 220 |
| 217 // Optional. | 221 // Optional. |
| 218 cmd.AppendSwitch(switches::kDisableDefaultApps); | 222 cmd.AppendSwitch(switches::kDisableDefaultApps); |
| 219 cmd.AppendSwitch(switches::kDisableExtensions); | 223 cmd.AppendSwitch(switches::kDisableExtensions); |
| 220 cmd.AppendSwitch(switches::kDisableGpu); | 224 cmd.AppendSwitch(switches::kDisableGpu); |
| 221 cmd.AppendSwitch(switches::kDisableSoftwareRasterizer); | 225 cmd.AppendSwitch(switches::kDisableSoftwareRasterizer); |
| 222 cmd.AppendSwitch(switches::kDisableSync); | 226 cmd.AppendSwitch(switches::kDisableSync); |
| 223 cmd.AppendSwitch(switches::kNoFirstRun); | 227 cmd.AppendSwitch(switches::kNoFirstRun); |
| 224 cmd.AppendSwitch(switches::kNoStartupWindow); | 228 cmd.AppendSwitch(switches::kNoStartupWindow); |
| 225 | 229 |
| 226 base::win::ScopedHandle chrome_handle; | 230 base::win::ScopedHandle chrome_handle; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 LOG(ERROR) << "Chrome launch failed."; | 328 LOG(ERROR) << "Chrome launch failed."; |
| 325 return std::string(); | 329 return std::string(); |
| 326 } | 330 } |
| 327 if (!json.empty()) { | 331 if (!json.empty()) { |
| 328 // Close chrome because Service State is ready. | 332 // Close chrome because Service State is ready. |
| 329 CloseChrome(chrome_process.Pass(), thread_id); | 333 CloseChrome(chrome_process.Pass(), thread_id); |
| 330 return json; | 334 return json; |
| 331 } | 335 } |
| 332 } | 336 } |
| 333 } | 337 } |
| OLD | NEW |