| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "content/public/browser/notification_service.h" | 10 #include "content/public/browser/notification_service.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 return false; | 137 return false; |
| 138 } | 138 } |
| 139 | 139 |
| 140 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( | 140 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( |
| 141 CommandLine* command_line, int child_process_id) { | 141 CommandLine* command_line, int child_process_id) { |
| 142 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 142 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
| 143 command_line->AppendSwitch(switches::kDumpRenderTree); | 143 command_line->AppendSwitch(switches::kDumpRenderTree); |
| 144 if (CommandLine::ForCurrentProcess()->HasSwitch( | 144 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 145 switches::kExposeInternalsForTesting)) | 145 switches::kExposeInternalsForTesting)) |
| 146 command_line->AppendSwitch(switches::kExposeInternalsForTesting); | 146 command_line->AppendSwitch(switches::kExposeInternalsForTesting); |
| 147 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kStableReleaseMode)) |
| 148 command_line->AppendSwitch(switches::kStableReleaseMode); |
| 147 } | 149 } |
| 148 | 150 |
| 149 void ShellContentBrowserClient::OverrideWebkitPrefs( | 151 void ShellContentBrowserClient::OverrideWebkitPrefs( |
| 150 RenderViewHost* render_view_host, | 152 RenderViewHost* render_view_host, |
| 151 const GURL& url, | 153 const GURL& url, |
| 152 WebPreferences* prefs) { | 154 WebPreferences* prefs) { |
| 153 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 155 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
| 154 return; | 156 return; |
| 155 WebKitTestController::Get()->OverrideWebkitPrefs(prefs); | 157 WebKitTestController::Get()->OverrideWebkitPrefs(prefs); |
| 156 } | 158 } |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 ShellBrowserContext* | 268 ShellBrowserContext* |
| 267 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 269 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
| 268 BrowserContext* content_browser_context) { | 270 BrowserContext* content_browser_context) { |
| 269 if (content_browser_context == browser_context()) | 271 if (content_browser_context == browser_context()) |
| 270 return browser_context(); | 272 return browser_context(); |
| 271 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 273 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
| 272 return off_the_record_browser_context(); | 274 return off_the_record_browser_context(); |
| 273 } | 275 } |
| 274 | 276 |
| 275 } // namespace content | 277 } // namespace content |
| OLD | NEW |