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

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

Issue 10693129: Merge 145632 to M21 - Disable bundled PPAPI Flash on Linux ia32 when SSE2 is not available. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 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 | « no previous file | no next file » | 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/file_util.h" 9 #include "base/file_util.h"
9 #include "base/path_service.h" 10 #include "base/path_service.h"
10 #include "base/process_util.h" 11 #include "base/process_util.h"
11 #include "base/string_number_conversions.h" 12 #include "base/string_number_conversions.h"
12 #include "base/string_split.h" 13 #include "base/string_split.h"
13 #include "base/string_util.h" 14 #include "base/string_util.h"
14 #include "base/stringprintf.h" 15 #include "base/stringprintf.h"
15 #include "base/utf_string_conversions.h" 16 #include "base/utf_string_conversions.h"
17 #include "build/build_config.h"
16 #include "chrome/common/child_process_logging.h" 18 #include "chrome/common/child_process_logging.h"
17 #include "chrome/common/chrome_paths.h" 19 #include "chrome/common/chrome_paths.h"
18 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
19 #include "chrome/common/chrome_version_info.h" 21 #include "chrome/common/chrome_version_info.h"
20 #include "chrome/common/pepper_flash.h" 22 #include "chrome/common/pepper_flash.h"
21 #include "chrome/common/render_messages.h" 23 #include "chrome/common/render_messages.h"
22 #include "chrome/common/url_constants.h" 24 #include "chrome/common/url_constants.h"
23 #include "content/public/common/pepper_plugin_info.h" 25 #include "content/public/common/pepper_plugin_info.h"
24 #include "content/public/common/url_constants.h" 26 #include "content/public/common/url_constants.h"
25 #include "grit/common_resources.h" 27 #include "grit/common_resources.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // Ignore bundled Pepper Flash if there is Pepper Flash specified from the 252 // Ignore bundled Pepper Flash if there is Pepper Flash specified from the
251 // command-line. 253 // command-line.
252 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kPpapiFlashPath)) 254 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kPpapiFlashPath))
253 return false; 255 return false;
254 256
255 bool force_disable = CommandLine::ForCurrentProcess()->HasSwitch( 257 bool force_disable = CommandLine::ForCurrentProcess()->HasSwitch(
256 switches::kDisableBundledPpapiFlash); 258 switches::kDisableBundledPpapiFlash);
257 if (force_disable) 259 if (force_disable)
258 return false; 260 return false;
259 261
262 // For Linux ia32, Flapper requires SSE2.
263 #if defined(OS_LINUX) && defined(ARCH_CPU_X86)
264 if (!base::CPU()::has_sse2())
265 return false;
266 #endif // ARCH_CPU_X86
267
260 FilePath flash_path; 268 FilePath flash_path;
261 if (!PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &flash_path)) 269 if (!PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &flash_path))
262 return false; 270 return false;
263 // It is an error to have FLAPPER_AVAILABLE defined but then not having the 271 // It is an error to have FLAPPER_AVAILABLE defined but then not having the
264 // plugin file in place, but this happens in Chrome OS builds. 272 // plugin file in place, but this happens in Chrome OS builds.
265 // Use --disable-bundled-ppapi-flash to skip this. 273 // Use --disable-bundled-ppapi-flash to skip this.
266 DCHECK(file_util::PathExists(flash_path)); 274 DCHECK(file_util::PathExists(flash_path));
267 275
268 bool force_enable = CommandLine::ForCurrentProcess()->HasSwitch( 276 bool force_enable = CommandLine::ForCurrentProcess()->HasSwitch(
269 switches::kEnableBundledPpapiFlash); 277 switches::kEnableBundledPpapiFlash);
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 507
500 bool ChromeContentClient::GetBundledFieldTrialPepperFlash( 508 bool ChromeContentClient::GetBundledFieldTrialPepperFlash(
501 content::PepperPluginInfo* plugin, 509 content::PepperPluginInfo* plugin,
502 bool* override_npapi_flash) { 510 bool* override_npapi_flash) {
503 if (!ConductingPepperFlashFieldTrial()) 511 if (!ConductingPepperFlashFieldTrial())
504 return false; 512 return false;
505 return GetBundledPepperFlash(plugin, override_npapi_flash); 513 return GetBundledPepperFlash(plugin, override_npapi_flash);
506 } 514 }
507 515
508 } // namespace chrome 516 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698