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

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 19079002: Enable pnacl by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update with code review feedback. Created 7 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 | Annotate | Revision Log
OLDNEW
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 } 486 }
486 return false; 487 return false;
487 } 488 }
488 489
489 std::string ChromeContentClient::GetCarbonInterposePath() const { 490 std::string ChromeContentClient::GetCarbonInterposePath() const {
490 return std::string(kInterposeLibraryPath); 491 return std::string(kInterposeLibraryPath);
491 } 492 }
492 #endif 493 #endif
493 494
494 } // namespace chrome 495 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698