| OLD | NEW |
| 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/browser/component_updater/flash_component_installer.h" | 5 #include "chrome/browser/component_updater/flash_component_installer.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 if (ver_nums.size() < 3) | 143 if (ver_nums.size() < 3) |
| 144 return false; | 144 return false; |
| 145 | 145 |
| 146 plugin_info->is_internal = false; | 146 plugin_info->is_internal = false; |
| 147 plugin_info->is_out_of_process = out_of_process; | 147 plugin_info->is_out_of_process = out_of_process; |
| 148 plugin_info->path = flash_path; | 148 plugin_info->path = flash_path; |
| 149 plugin_info->name = kFlashPluginName; | 149 plugin_info->name = kFlashPluginName; |
| 150 plugin_info->permissions = kPepperFlashPermissions; | 150 plugin_info->permissions = kPepperFlashPermissions; |
| 151 | 151 |
| 152 // The description is like "Shockwave Flash 10.2 r154". | 152 // The description is like "Shockwave Flash 10.2 r154". |
| 153 plugin_info->description = StringPrintf("%s %d.%d r%d", | 153 plugin_info->description = base::StringPrintf("%s %d.%d r%d", |
| 154 kFlashPluginName, ver_nums[0], ver_nums[1], ver_nums[2]); | 154 kFlashPluginName, ver_nums[0], ver_nums[1], ver_nums[2]); |
| 155 | 155 |
| 156 plugin_info->version = flash_version.GetString(); | 156 plugin_info->version = flash_version.GetString(); |
| 157 | 157 |
| 158 webkit::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType, | 158 webkit::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType, |
| 159 kFlashPluginSwfExtension, | 159 kFlashPluginSwfExtension, |
| 160 kFlashPluginName); | 160 kFlashPluginName); |
| 161 plugin_info->mime_types.push_back(swf_mime_type); | 161 plugin_info->mime_types.push_back(swf_mime_type); |
| 162 webkit::WebPluginMimeType spl_mime_type(kFlashPluginSplMimeType, | 162 webkit::WebPluginMimeType spl_mime_type(kFlashPluginSplMimeType, |
| 163 kFlashPluginSplExtension, | 163 kFlashPluginSplExtension, |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 #if defined(GOOGLE_CHROME_BUILD) | 387 #if defined(GOOGLE_CHROME_BUILD) |
| 388 // Component updated flash supersedes bundled flash therefore if that one | 388 // Component updated flash supersedes bundled flash therefore if that one |
| 389 // is disabled then this one should never install. | 389 // is disabled then this one should never install. |
| 390 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 390 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| 391 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash)) | 391 if (cmd_line->HasSwitch(switches::kDisableBundledPpapiFlash)) |
| 392 return; | 392 return; |
| 393 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 393 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
| 394 base::Bind(&StartPepperFlashUpdateRegistration, cus)); | 394 base::Bind(&StartPepperFlashUpdateRegistration, cus)); |
| 395 #endif | 395 #endif |
| 396 } | 396 } |
| OLD | NEW |