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