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

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

Issue 10735011: Add permissions buts for Pepper plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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 | 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) 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 if (!flash_version.IsValid()) 138 if (!flash_version.IsValid())
139 return false; 139 return false;
140 const std::vector<uint16> ver_nums = flash_version.components(); 140 const std::vector<uint16> ver_nums = flash_version.components();
141 if (ver_nums.size() < 3) 141 if (ver_nums.size() < 3)
142 return false; 142 return false;
143 143
144 plugin_info->is_internal = false; 144 plugin_info->is_internal = false;
145 plugin_info->is_out_of_process = out_of_process; 145 plugin_info->is_out_of_process = out_of_process;
146 plugin_info->path = flash_path; 146 plugin_info->path = flash_path;
147 plugin_info->name = kFlashPluginName; 147 plugin_info->name = kFlashPluginName;
148 plugin_info->permissions = ppapi::PERMISSION_DEV |
149 ppapi::PERMISSION_PRIVATE |
150 ppapi::PERMISSION_BYPASS_USER_GESTURE;
148 151
149 // The description is like "Shockwave Flash 10.2 r154". 152 // The description is like "Shockwave Flash 10.2 r154".
150 plugin_info->description = StringPrintf("%s %d.%d r%d", 153 plugin_info->description = StringPrintf("%s %d.%d r%d",
151 kFlashPluginName, ver_nums[0], ver_nums[1], ver_nums[2]); 154 kFlashPluginName, ver_nums[0], ver_nums[1], ver_nums[2]);
152 155
153 plugin_info->version = flash_version.GetString(); 156 plugin_info->version = flash_version.GetString();
154 157
155 webkit::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType, 158 webkit::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType,
156 kFlashPluginSwfExtension, 159 kFlashPluginSwfExtension,
157 kFlashPluginName); 160 kFlashPluginName);
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 } 361 }
359 362
360 } // namespace 363 } // namespace
361 364
362 void RegisterPepperFlashComponent(ComponentUpdateService* cus) { 365 void RegisterPepperFlashComponent(ComponentUpdateService* cus) {
363 #if defined(GOOGLE_CHROME_BUILD) && !defined(FLAPPER_AVAILABLE) 366 #if defined(GOOGLE_CHROME_BUILD) && !defined(FLAPPER_AVAILABLE)
364 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 367 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
365 base::Bind(&StartPepperFlashUpdateRegistration, cus)); 368 base::Bind(&StartPepperFlashUpdateRegistration, cus));
366 #endif 369 #endif
367 } 370 }
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