OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/cpu.h" | 8 #include "base/cpu.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 static bool skip_nacl_file_check = false; | 164 static bool skip_nacl_file_check = false; |
165 if (PathService::Get(chrome::FILE_NACL_PLUGIN, &path)) { | 165 if (PathService::Get(chrome::FILE_NACL_PLUGIN, &path)) { |
166 if (skip_nacl_file_check || base::PathExists(path)) { | 166 if (skip_nacl_file_check || base::PathExists(path)) { |
167 content::PepperPluginInfo nacl; | 167 content::PepperPluginInfo nacl; |
168 nacl.path = path; | 168 nacl.path = path; |
169 nacl.name = chrome::ChromeContentClient::kNaClPluginName; | 169 nacl.name = chrome::ChromeContentClient::kNaClPluginName; |
170 content::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType, | 170 content::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType, |
171 kNaClPluginExtension, | 171 kNaClPluginExtension, |
172 kNaClPluginDescription); | 172 kNaClPluginDescription); |
173 nacl.mime_types.push_back(nacl_mime_type); | 173 nacl.mime_types.push_back(nacl_mime_type); |
174 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePnacl)) { | 174 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 175 switches::kDisablePnacl)) { |
175 content::WebPluginMimeType pnacl_mime_type(kPnaclPluginMimeType, | 176 content::WebPluginMimeType pnacl_mime_type(kPnaclPluginMimeType, |
176 kPnaclPluginExtension, | 177 kPnaclPluginExtension, |
177 kPnaclPluginDescription); | 178 kPnaclPluginDescription); |
178 nacl.mime_types.push_back(pnacl_mime_type); | 179 nacl.mime_types.push_back(pnacl_mime_type); |
179 } | 180 } |
180 nacl.permissions = kNaClPluginPermissions; | 181 nacl.permissions = kNaClPluginPermissions; |
181 plugins->push_back(nacl); | 182 plugins->push_back(nacl); |
182 | 183 |
183 skip_nacl_file_check = true; | 184 skip_nacl_file_check = true; |
184 } | 185 } |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 } | 485 } |
485 return false; | 486 return false; |
486 } | 487 } |
487 | 488 |
488 std::string ChromeContentClient::GetCarbonInterposePath() const { | 489 std::string ChromeContentClient::GetCarbonInterposePath() const { |
489 return std::string(kInterposeLibraryPath); | 490 return std::string(kInterposeLibraryPath); |
490 } | 491 } |
491 #endif | 492 #endif |
492 | 493 |
493 } // namespace chrome | 494 } // namespace chrome |
OLD | NEW |