Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: content/shell/browser/shell_content_browser_client.cc

Issue 1248363003: Merge M45: Remove NPAPI command line flags entirely. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2454
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/shell/browser/shell_content_browser_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/files/file.h" 9 #include "base/files/file.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 url::kDataScheme, 194 url::kDataScheme,
195 url::kFileScheme, 195 url::kFileScheme,
196 }; 196 };
197 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { 197 for (size_t i = 0; i < arraysize(kProtocolList); ++i) {
198 if (url.scheme() == kProtocolList[i]) 198 if (url.scheme() == kProtocolList[i])
199 return true; 199 return true;
200 } 200 }
201 return false; 201 return false;
202 } 202 }
203 203
204 bool ShellContentBrowserClient::IsNPAPIEnabled() {
205 #if defined(OS_WIN) || defined(OS_MACOSX)
206 return true;
207 #else
208 return false;
209 #endif
210 }
211
204 void ShellContentBrowserClient::AppendExtraCommandLineSwitches( 212 void ShellContentBrowserClient::AppendExtraCommandLineSwitches(
205 base::CommandLine* command_line, 213 base::CommandLine* command_line,
206 int child_process_id) { 214 int child_process_id) {
207 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 215 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
208 switches::kRunLayoutTest)) { 216 switches::kRunLayoutTest)) {
209 command_line->AppendSwitch(switches::kRunLayoutTest); 217 command_line->AppendSwitch(switches::kRunLayoutTest);
210 } 218 }
211 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 219 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
212 switches::kDumpLineBoxTrees)) { 220 switches::kDumpLineBoxTrees)) {
213 command_line->AppendSwitch(switches::kDumpLineBoxTrees); 221 command_line->AppendSwitch(switches::kDumpLineBoxTrees);
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 ShellBrowserContext* 408 ShellBrowserContext*
401 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( 409 ShellContentBrowserClient::ShellBrowserContextForBrowserContext(
402 BrowserContext* content_browser_context) { 410 BrowserContext* content_browser_context) {
403 if (content_browser_context == browser_context()) 411 if (content_browser_context == browser_context())
404 return browser_context(); 412 return browser_context();
405 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); 413 DCHECK_EQ(content_browser_context, off_the_record_browser_context());
406 return off_the_record_browser_context(); 414 return off_the_record_browser_context();
407 } 415 }
408 416
409 } // namespace content 417 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell_content_browser_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698