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

Side by Side Diff: content/renderer/pepper/content_renderer_pepper_host_factory.cc

Issue 10855152: Remove dev check for file chooser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | no next file » | 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 "content/renderer/pepper/content_renderer_pepper_host_factory.h" 5 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/renderer/pepper/pepper_file_chooser_host.h" 8 #include "content/renderer/pepper/pepper_file_chooser_host.h"
9 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" 9 #include "content/renderer/pepper/renderer_ppapi_host_impl.h"
10 #include "ppapi/host/resource_host.h" 10 #include "ppapi/host/resource_host.h"
(...skipping 18 matching lines...) Expand all
29 const IPC::Message& message) { 29 const IPC::Message& message) {
30 DCHECK(host == host_->GetPpapiHost()); 30 DCHECK(host == host_->GetPpapiHost());
31 31
32 // Make sure the plugin is giving us a valid instance for this resource. 32 // Make sure the plugin is giving us a valid instance for this resource.
33 if (!host_->IsValidInstance(instance)) 33 if (!host_->IsValidInstance(instance))
34 return scoped_ptr<ResourceHost>(); 34 return scoped_ptr<ResourceHost>();
35 35
36 // Resources for dev interfaces. 36 // Resources for dev interfaces.
37 // TODO(brettw) when we support any public or private interfaces, put them in 37 // TODO(brettw) when we support any public or private interfaces, put them in
38 // a separate switch above. 38 // a separate switch above.
39 if (GetPermissions().HasPermission(ppapi::PERMISSION_DEV)) { 39
40 // TODO(brettw) put back this dev check! This was removed to fix issue 138902
41 // where the permissions for bundled Flash (but not Flash that you specify
42 // on the command line, making it difficult to test) are incorrect.
43 /*if (GetPermissions().HasPermission(ppapi::PERMISSION_DEV))*/ {
Tom Sepez 2012/08/14 18:21:02 nit: just for my own education, what do our style
40 switch (message.type()) { 44 switch (message.type()) {
41 case PpapiHostMsg_FileChooser_Create::ID: 45 case PpapiHostMsg_FileChooser_Create::ID:
42 return scoped_ptr<ResourceHost>(new PepperFileChooserHost( 46 return scoped_ptr<ResourceHost>(new PepperFileChooserHost(
43 host_, instance, params.pp_resource())); 47 host_, instance, params.pp_resource()));
44 } 48 }
45 } 49 }
46 return scoped_ptr<ResourceHost>(); 50 return scoped_ptr<ResourceHost>();
47 } 51 }
48 52
49 const ppapi::PpapiPermissions& 53 const ppapi::PpapiPermissions&
50 ContentRendererPepperHostFactory::GetPermissions() const { 54 ContentRendererPepperHostFactory::GetPermissions() const {
51 return host_->GetPpapiHost()->permissions(); 55 return host_->GetPpapiHost()->permissions();
52 } 56 }
53 57
54 } // namespace content 58 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698