| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 const std::vector<uint16> ver_nums = flash_version.components(); | 137 const std::vector<uint16> ver_nums = flash_version.components(); |
| 138 if (ver_nums.size() < 3) | 138 if (ver_nums.size() < 3) |
| 139 return false; | 139 return false; |
| 140 | 140 |
| 141 plugin_info->is_internal = false; | 141 plugin_info->is_internal = false; |
| 142 plugin_info->is_out_of_process = out_of_process; | 142 plugin_info->is_out_of_process = out_of_process; |
| 143 plugin_info->path = flash_path; | 143 plugin_info->path = flash_path; |
| 144 plugin_info->name = kFlashPluginName; | 144 plugin_info->name = kFlashPluginName; |
| 145 plugin_info->permissions = kPepperFlashPermissions; | 145 plugin_info->permissions = kPepperFlashPermissions; |
| 146 | 146 |
| 147 // TODO(brettw) bug 147507: remove this logging. |
| 148 LOG(INFO) << "MakePepperFlashPluginInfo permissions = " |
| 149 << plugin_info->permissions; |
| 150 |
| 147 // The description is like "Shockwave Flash 10.2 r154". | 151 // The description is like "Shockwave Flash 10.2 r154". |
| 148 plugin_info->description = StringPrintf("%s %d.%d r%d", | 152 plugin_info->description = StringPrintf("%s %d.%d r%d", |
| 149 kFlashPluginName, ver_nums[0], ver_nums[1], ver_nums[2]); | 153 kFlashPluginName, ver_nums[0], ver_nums[1], ver_nums[2]); |
| 150 | 154 |
| 151 plugin_info->version = flash_version.GetString(); | 155 plugin_info->version = flash_version.GetString(); |
| 152 | 156 |
| 153 webkit::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType, | 157 webkit::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType, |
| 154 kFlashPluginSwfExtension, | 158 kFlashPluginSwfExtension, |
| 155 kFlashPluginName); | 159 kFlashPluginName); |
| 156 plugin_info->mime_types.push_back(swf_mime_type); | 160 plugin_info->mime_types.push_back(swf_mime_type); |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 } | 352 } |
| 349 | 353 |
| 350 } // namespace | 354 } // namespace |
| 351 | 355 |
| 352 void RegisterPepperFlashComponent(ComponentUpdateService* cus) { | 356 void RegisterPepperFlashComponent(ComponentUpdateService* cus) { |
| 353 #if defined(GOOGLE_CHROME_BUILD) | 357 #if defined(GOOGLE_CHROME_BUILD) |
| 354 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 358 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
| 355 base::Bind(&StartPepperFlashUpdateRegistration, cus)); | 359 base::Bind(&StartPepperFlashUpdateRegistration, cus)); |
| 356 #endif | 360 #endif |
| 357 } | 361 } |
| OLD | NEW |