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

Side by Side Diff: chrome/browser/component_updater/pepper_flash_component_installer.cc

Issue 7790013: Clean up plugin constants (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | « no previous file | chrome/common/chrome_content_client.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/component_updater/pepper_flash_component_installer.h" 5 #include "chrome/browser/component_updater/pepper_flash_component_installer.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/stringprintf.h" 14 #include "base/stringprintf.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/component_updater/component_updater_service.h" 16 #include "chrome/browser/component_updater/component_updater_service.h"
17 #include "chrome/common/chrome_paths.h" 17 #include "chrome/common/chrome_paths.h"
18 #include "content/browser/browser_thread.h" 18 #include "content/browser/browser_thread.h"
19 #include "content/common/pepper_plugin_registry.h" 19 #include "content/common/pepper_plugin_registry.h"
20 #include "webkit/plugins/npapi/plugin_list.h" 20 #include "webkit/plugins/npapi/plugin_list.h"
21 #include "webkit/plugins/plugin_constants.h"
21 22
22 namespace { 23 namespace {
23 24
24 // CRX hash. The extension id is: mimojjlkmoijpicakmndhoigimigcmbb. 25 // CRX hash. The extension id is: mimojjlkmoijpicakmndhoigimigcmbb.
25 const uint8 sha2_hash[] = {0xc8, 0xce, 0x99, 0xba, 0xce, 0x89, 0xf8, 0x20, 26 const uint8 sha2_hash[] = {0xc8, 0xce, 0x99, 0xba, 0xce, 0x89, 0xf8, 0x20,
26 0xac, 0xd3, 0x7e, 0x86, 0x8c, 0x86, 0x2c, 0x11, 27 0xac, 0xd3, 0x7e, 0x86, 0x8c, 0x86, 0x2c, 0x11,
27 0xb9, 0x40, 0xc5, 0x55, 0xaf, 0x08, 0x63, 0x70, 28 0xb9, 0x40, 0xc5, 0x55, 0xaf, 0x08, 0x63, 0x70,
28 0x54, 0xf9, 0x56, 0xd3, 0xe7, 0x88, 0xba, 0x8c}; 29 0x54, 0xf9, 0x56, 0xd3, 0xe7, 0x88, 0xba, 0x8c};
29 30
30 // File name of the Pepper Flash plugin on different platforms. 31 // File name of the Pepper Flash plugin on different platforms.
31 const FilePath::CharType kPepperFlashPluginFileName[] = 32 const FilePath::CharType kPepperFlashPluginFileName[] =
32 #if defined(OS_MACOSX) 33 #if defined(OS_MACOSX)
33 FILE_PATH_LITERAL("PepperFlashPlayer.plugin"); 34 FILE_PATH_LITERAL("PepperFlashPlayer.plugin");
34 #elif defined(OS_WIN) 35 #elif defined(OS_WIN)
35 FILE_PATH_LITERAL("pepflashplayer.dll"); 36 FILE_PATH_LITERAL("pepflashplayer.dll");
36 #else // OS_LINUX, etc. 37 #else // OS_LINUX, etc.
37 FILE_PATH_LITERAL("libpepflashplayer.so"); 38 FILE_PATH_LITERAL("libpepflashplayer.so");
38 #endif 39 #endif
39 40
40 // File name of the Pepper Flash component manifest on different platforms. 41 // File name of the Pepper Flash component manifest on different platforms.
41 const char kPepperFlashManifestName[] = 42 const char kPepperFlashManifestName[] =
42 #if defined(OS_MACOSX) 43 #if defined(OS_MACOSX)
43 "MacFlapper"; 44 "MacFlapper";
44 #elif defined(OS_WIN) 45 #elif defined(OS_WIN)
45 "WinFlapper"; 46 "WinFlapper";
46 #else // OS_LINUX, etc. 47 #else // OS_LINUX, etc.
47 "NixFlapper"; 48 "NixFlapper";
48 #endif 49 #endif
49 50
50 const char* kFlashPluginName = "Shockwave Flash";
51 const char* kFlashPluginSwfMimeType = "application/x-shockwave-flash";
52 const char* kFlashPluginSwfExtension = "swf";
53 const char* kFlashPluginSplMimeType = "application/futuresplash";
54 const char* kFlashPluginSplExtension = "spl";
55
56 // The pepper flash plugins are in a directory with this name. 51 // The pepper flash plugins are in a directory with this name.
57 const FilePath::CharType kPepperFlashBaseDirectory[] = 52 const FilePath::CharType kPepperFlashBaseDirectory[] =
58 FILE_PATH_LITERAL("PepperFlash"); 53 FILE_PATH_LITERAL("PepperFlash");
59 54
60 // If we don't have a flash pepper component, this is the version we claim. 55 // If we don't have a flash pepper component, this is the version we claim.
61 const char kNullVersion[] = "0.0.0.0"; 56 const char kNullVersion[] = "0.0.0.0";
62 57
63 // The base directory on windows looks like: 58 // The base directory on windows looks like:
64 // <profile>\AppData\Local\Google\Chrome\User Data\PepperFlash\. 59 // <profile>\AppData\Local\Google\Chrome\User Data\PepperFlash\.
65 FilePath GetPepperFlashBaseDirectory() { 60 FilePath GetPepperFlashBaseDirectory() {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 NewRunnableFunction(&FinishPepperFlashUpdateRegistration, cus, version)); 228 NewRunnableFunction(&FinishPepperFlashUpdateRegistration, cus, version));
234 } 229 }
235 230
236 void RegisterPepperFlashComponent(ComponentUpdateService* cus) { 231 void RegisterPepperFlashComponent(ComponentUpdateService* cus) {
237 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) 232 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
238 // TODO(cpu): support Mac and Linux flash pepper. 233 // TODO(cpu): support Mac and Linux flash pepper.
239 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 234 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
240 NewRunnableFunction(&StartPepperFlashUpdateRegistration, cus)); 235 NewRunnableFunction(&StartPepperFlashUpdateRegistration, cus));
241 #endif 236 #endif
242 } 237 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698