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 "content/shell/browser/shell_content_browser_client.h" | 5 #include "content/shell/browser/shell_content_browser_client.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 if (url.scheme() == kProtocolList[i]) | 203 if (url.scheme() == kProtocolList[i]) |
204 return true; | 204 return true; |
205 } | 205 } |
206 return false; | 206 return false; |
207 } | 207 } |
208 | 208 |
209 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( | 209 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( |
210 CommandLine* command_line, int child_process_id) { | 210 CommandLine* command_line, int child_process_id) { |
211 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 211 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
212 command_line->AppendSwitch(switches::kDumpRenderTree); | 212 command_line->AppendSwitch(switches::kDumpRenderTree); |
| 213 // FIXME(dro) crbug.com/367082: Remove the smoothing parameter |
| 214 // once the command line switch rename is complete on the Blink side. |
213 if (CommandLine::ForCurrentProcess()->HasSwitch( | 215 if (CommandLine::ForCurrentProcess()->HasSwitch( |
214 switches::kEnableFontSmoothing)) | 216 switches::kEnableFontSmoothing)) |
215 command_line->AppendSwitch(switches::kEnableFontSmoothing); | 217 command_line->AppendSwitch(switches::kEnableFontSmoothing); |
216 if (CommandLine::ForCurrentProcess()->HasSwitch( | 218 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 219 switches::kEnableFontAntialiasing)) |
| 220 command_line->AppendSwitch(switches::kEnableFontAntialiasing); |
| 221 if (CommandLine::ForCurrentProcess()->HasSwitch( |
217 switches::kExposeInternalsForTesting)) | 222 switches::kExposeInternalsForTesting)) |
218 command_line->AppendSwitch(switches::kExposeInternalsForTesting); | 223 command_line->AppendSwitch(switches::kExposeInternalsForTesting); |
219 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kStableReleaseMode)) | 224 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kStableReleaseMode)) |
220 command_line->AppendSwitch(switches::kStableReleaseMode); | 225 command_line->AppendSwitch(switches::kStableReleaseMode); |
221 if (CommandLine::ForCurrentProcess()->HasSwitch( | 226 if (CommandLine::ForCurrentProcess()->HasSwitch( |
222 switches::kEnableCrashReporter)) { | 227 switches::kEnableCrashReporter)) { |
223 command_line->AppendSwitch(switches::kEnableCrashReporter); | 228 command_line->AppendSwitch(switches::kEnableCrashReporter); |
224 } | 229 } |
225 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kCrashDumpsDir)) { | 230 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kCrashDumpsDir)) { |
226 command_line->AppendSwitchPath( | 231 command_line->AppendSwitchPath( |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 ShellBrowserContext* | 371 ShellBrowserContext* |
367 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 372 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
368 BrowserContext* content_browser_context) { | 373 BrowserContext* content_browser_context) { |
369 if (content_browser_context == browser_context()) | 374 if (content_browser_context == browser_context()) |
370 return browser_context(); | 375 return browser_context(); |
371 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 376 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
372 return off_the_record_browser_context(); | 377 return off_the_record_browser_context(); |
373 } | 378 } |
374 | 379 |
375 } // namespace content | 380 } // namespace content |
OLD | NEW |