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

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: IOS flag name 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
« no previous file with comments | « chrome/browser/ui/webui/nacl_ui.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/nacl_ui.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698