| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 static bool skip_nacl_file_check = false; | 163 static bool skip_nacl_file_check = false; |
| 164 if (PathService::Get(chrome::FILE_NACL_PLUGIN, &path)) { | 164 if (PathService::Get(chrome::FILE_NACL_PLUGIN, &path)) { |
| 165 if (skip_nacl_file_check || base::PathExists(path)) { | 165 if (skip_nacl_file_check || base::PathExists(path)) { |
| 166 content::PepperPluginInfo nacl; | 166 content::PepperPluginInfo nacl; |
| 167 nacl.path = path; | 167 nacl.path = path; |
| 168 nacl.name = chrome::ChromeContentClient::kNaClPluginName; | 168 nacl.name = chrome::ChromeContentClient::kNaClPluginName; |
| 169 content::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType, | 169 content::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType, |
| 170 kNaClPluginExtension, | 170 kNaClPluginExtension, |
| 171 kNaClPluginDescription); | 171 kNaClPluginDescription); |
| 172 nacl.mime_types.push_back(nacl_mime_type); | 172 nacl.mime_types.push_back(nacl_mime_type); |
| 173 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 173 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePnacl)) { |
| 174 switches::kDisablePnacl)) { | |
| 175 content::WebPluginMimeType pnacl_mime_type(kPnaclPluginMimeType, | 174 content::WebPluginMimeType pnacl_mime_type(kPnaclPluginMimeType, |
| 176 kPnaclPluginExtension, | 175 kPnaclPluginExtension, |
| 177 kPnaclPluginDescription); | 176 kPnaclPluginDescription); |
| 178 nacl.mime_types.push_back(pnacl_mime_type); | 177 nacl.mime_types.push_back(pnacl_mime_type); |
| 179 } | 178 } |
| 180 nacl.permissions = kNaClPluginPermissions; | 179 nacl.permissions = kNaClPluginPermissions; |
| 181 plugins->push_back(nacl); | 180 plugins->push_back(nacl); |
| 182 | 181 |
| 183 skip_nacl_file_check = true; | 182 skip_nacl_file_check = true; |
| 184 } | 183 } |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 } | 483 } |
| 485 return false; | 484 return false; |
| 486 } | 485 } |
| 487 | 486 |
| 488 std::string ChromeContentClient::GetCarbonInterposePath() const { | 487 std::string ChromeContentClient::GetCarbonInterposePath() const { |
| 489 return std::string(kInterposeLibraryPath); | 488 return std::string(kInterposeLibraryPath); |
| 490 } | 489 } |
| 491 #endif | 490 #endif |
| 492 | 491 |
| 493 } // namespace chrome | 492 } // namespace chrome |
| OLD | NEW |