| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 void ShellContentBrowserClient::RegisterOutOfProcessMojoApplications( | 227 void ShellContentBrowserClient::RegisterOutOfProcessMojoApplications( |
| 228 OutOfProcessMojoApplicationMap* apps) { | 228 OutOfProcessMojoApplicationMap* apps) { |
| 229 apps->insert(std::make_pair(kTestMojoAppUrl, | 229 apps->insert(std::make_pair(kTestMojoAppUrl, |
| 230 base::UTF8ToUTF16("Test Mojo App"))); | 230 base::UTF8ToUTF16("Test Mojo App"))); |
| 231 } | 231 } |
| 232 | 232 |
| 233 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( | 233 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( |
| 234 base::CommandLine* command_line, | 234 base::CommandLine* command_line, |
| 235 int child_process_id) { | 235 int child_process_id) { |
| 236 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 236 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 237 switches::kExposeInternalsForTesting)) { |
| 238 command_line->AppendSwitch(switches::kExposeInternalsForTesting); |
| 239 } |
| 240 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 237 switches::kEnableCrashReporter)) { | 241 switches::kEnableCrashReporter)) { |
| 238 command_line->AppendSwitch(switches::kEnableCrashReporter); | 242 command_line->AppendSwitch(switches::kEnableCrashReporter); |
| 239 } | 243 } |
| 240 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 244 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 241 switches::kCrashDumpsDir)) { | 245 switches::kCrashDumpsDir)) { |
| 242 command_line->AppendSwitchPath( | 246 command_line->AppendSwitchPath( |
| 243 switches::kCrashDumpsDir, | 247 switches::kCrashDumpsDir, |
| 244 base::CommandLine::ForCurrentProcess()->GetSwitchValuePath( | 248 base::CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
| 245 switches::kCrashDumpsDir)); | 249 switches::kCrashDumpsDir)); |
| 246 } | 250 } |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 ShellBrowserContext* | 398 ShellBrowserContext* |
| 395 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 399 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
| 396 BrowserContext* content_browser_context) { | 400 BrowserContext* content_browser_context) { |
| 397 if (content_browser_context == browser_context()) | 401 if (content_browser_context == browser_context()) |
| 398 return browser_context(); | 402 return browser_context(); |
| 399 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 403 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
| 400 return off_the_record_browser_context(); | 404 return off_the_record_browser_context(); |
| 401 } | 405 } |
| 402 | 406 |
| 403 } // namespace content | 407 } // namespace content |
| OLD | NEW |