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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 switches::kEnableCrashReporter)) { | 221 switches::kEnableCrashReporter)) { |
222 command_line->AppendSwitch(switches::kEnableCrashReporter); | 222 command_line->AppendSwitch(switches::kEnableCrashReporter); |
223 } | 223 } |
224 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kCrashDumpsDir)) { | 224 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kCrashDumpsDir)) { |
225 command_line->AppendSwitchPath( | 225 command_line->AppendSwitchPath( |
226 switches::kCrashDumpsDir, | 226 switches::kCrashDumpsDir, |
227 CommandLine::ForCurrentProcess()->GetSwitchValuePath( | 227 CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
228 switches::kCrashDumpsDir)); | 228 switches::kCrashDumpsDir)); |
229 } | 229 } |
230 if (CommandLine::ForCurrentProcess()->HasSwitch( | 230 if (CommandLine::ForCurrentProcess()->HasSwitch( |
231 switches::kEnableLeakDetection)) | 231 switches::kEnableLeakDetection)) { |
232 command_line->AppendSwitch(switches::kEnableLeakDetection); | 232 command_line->AppendSwitchASCII( |
| 233 switches::kEnableLeakDetection, |
| 234 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 235 switches::kEnableLeakDetection)); |
| 236 } |
233 if (CommandLine::ForCurrentProcess()->HasSwitch( | 237 if (CommandLine::ForCurrentProcess()->HasSwitch( |
234 switches::kRegisterFontFiles)) { | 238 switches::kRegisterFontFiles)) { |
235 command_line->AppendSwitchASCII( | 239 command_line->AppendSwitchASCII( |
236 switches::kRegisterFontFiles, | 240 switches::kRegisterFontFiles, |
237 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 241 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
238 switches::kRegisterFontFiles)); | 242 switches::kRegisterFontFiles)); |
239 } | 243 } |
240 } | 244 } |
241 | 245 |
242 void ShellContentBrowserClient::OverrideWebkitPrefs( | 246 void ShellContentBrowserClient::OverrideWebkitPrefs( |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 ShellBrowserContext* | 368 ShellBrowserContext* |
365 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 369 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
366 BrowserContext* content_browser_context) { | 370 BrowserContext* content_browser_context) { |
367 if (content_browser_context == browser_context()) | 371 if (content_browser_context == browser_context()) |
368 return browser_context(); | 372 return browser_context(); |
369 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 373 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
370 return off_the_record_browser_context(); | 374 return off_the_record_browser_context(); |
371 } | 375 } |
372 | 376 |
373 } // namespace content | 377 } // namespace content |
OLD | NEW |