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

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

Issue 459603003: Cleanup: Remove unneeded SSE2 checks and unused code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix win build Created 6 years, 3 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/upgrade_detector_impl.cc ('k') | media/base/BUILD.gn » ('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"
9 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
10 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
11 #include "base/path_service.h" 10 #include "base/path_service.h"
12 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
13 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/string_split.h" 13 #include "base/strings/string_split.h"
15 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
16 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
17 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
18 #include "build/build_config.h" 17 #include "build/build_config.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 #include "chrome/common/widevine_cdm_constants.h" 66 #include "chrome/common/widevine_cdm_constants.h"
68 #endif 67 #endif
69 68
70 namespace { 69 namespace {
71 70
72 #if defined(ENABLE_PLUGINS) 71 #if defined(ENABLE_PLUGINS)
73 const char kPDFPluginMimeType[] = "application/pdf"; 72 const char kPDFPluginMimeType[] = "application/pdf";
74 const char kPDFPluginExtension[] = "pdf"; 73 const char kPDFPluginExtension[] = "pdf";
75 const char kPDFPluginDescription[] = "Portable Document Format"; 74 const char kPDFPluginDescription[] = "Portable Document Format";
76 const char kPDFPluginPrintPreviewMimeType[] = 75 const char kPDFPluginPrintPreviewMimeType[] =
77 "application/x-google-chrome-print-preview-pdf"; 76 "application/x-google-chrome-print-preview-pdf";
78 const char kPDFPluginOutOfProcessMimeType[] = 77 const char kPDFPluginOutOfProcessMimeType[] =
79 "application/x-google-chrome-pdf"; 78 "application/x-google-chrome-pdf";
80 const uint32 kPDFPluginPermissions = ppapi::PERMISSION_PRIVATE | 79 const uint32 kPDFPluginPermissions = ppapi::PERMISSION_PRIVATE |
81 ppapi::PERMISSION_DEV; 80 ppapi::PERMISSION_DEV;
82 81
83 const char kO1DPluginName[] = "Google Talk Plugin Video Renderer"; 82 const char kO1DPluginName[] = "Google Talk Plugin Video Renderer";
84 const char kO1DPluginMimeType[] ="application/o1d"; 83 const char kO1DPluginMimeType[] ="application/o1d";
85 const char kO1DPluginExtension[] = ""; 84 const char kO1DPluginExtension[] = "";
86 const char kO1DPluginDescription[] = "Google Talk Plugin Video Renderer"; 85 const char kO1DPluginDescription[] = "Google Talk Plugin Video Renderer";
87 const uint32 kO1DPluginPermissions = ppapi::PERMISSION_PRIVATE | 86 const uint32 kO1DPluginPermissions = ppapi::PERMISSION_PRIVATE |
88 ppapi::PERMISSION_DEV; 87 ppapi::PERMISSION_DEV;
89 88
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 // Ignore bundled Pepper Flash if there is Pepper Flash specified from the 388 // Ignore bundled Pepper Flash if there is Pepper Flash specified from the
390 // command-line. 389 // command-line.
391 if (command_line->HasSwitch(switches::kPpapiFlashPath)) 390 if (command_line->HasSwitch(switches::kPpapiFlashPath))
392 return false; 391 return false;
393 392
394 bool force_disable = 393 bool force_disable =
395 command_line->HasSwitch(switches::kDisableBundledPpapiFlash); 394 command_line->HasSwitch(switches::kDisableBundledPpapiFlash);
396 if (force_disable) 395 if (force_disable)
397 return false; 396 return false;
398 397
399 // For Linux ia32, Flapper requires SSE2.
400 #if defined(OS_LINUX) && defined(ARCH_CPU_X86)
401 if (!base::CPU().has_sse2())
402 return false;
403 #endif // ARCH_CPU_X86
404
405 base::FilePath flash_path; 398 base::FilePath flash_path;
406 if (!PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &flash_path)) 399 if (!PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &flash_path))
407 return false; 400 return false;
408 401
409 *plugin = CreatePepperFlashInfo(flash_path, FLAPPER_VERSION_STRING); 402 *plugin = CreatePepperFlashInfo(flash_path, FLAPPER_VERSION_STRING);
410 return true; 403 return true;
411 #else 404 #else
412 return false; 405 return false;
413 #endif // FLAPPER_AVAILABLE 406 #endif // FLAPPER_AVAILABLE
414 } 407 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 int sandbox_type, 534 int sandbox_type,
542 int* sandbox_profile_resource_id) const { 535 int* sandbox_profile_resource_id) const {
543 DCHECK(sandbox_profile_resource_id); 536 DCHECK(sandbox_profile_resource_id);
544 if (sandbox_type == NACL_SANDBOX_TYPE_NACL_LOADER) { 537 if (sandbox_type == NACL_SANDBOX_TYPE_NACL_LOADER) {
545 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; 538 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE;
546 return true; 539 return true;
547 } 540 }
548 return false; 541 return false;
549 } 542 }
550 #endif 543 #endif
OLDNEW
« no previous file with comments | « chrome/browser/upgrade_detector_impl.cc ('k') | media/base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698