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

Side by Side Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 104673003: Pepper: Send dev/canary channel status to plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OVERRIDE build fix Created 7 years 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 | « content/ppapi_plugin/ppapi_thread.h ('k') | content/public/browser/content_browser_client.h » ('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 "content/ppapi_plugin/ppapi_thread.h" 5 #include "content/ppapi_plugin/ppapi_thread.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/crash_logging.h" 10 #include "base/debug/crash_logging.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 plugin_dispatchers_.find(id) != plugin_dispatchers_.end()); 192 plugin_dispatchers_.find(id) != plugin_dispatchers_.end());
193 plugin_dispatchers_[id] = plugin_dispatcher; 193 plugin_dispatchers_[id] = plugin_dispatcher;
194 return id; 194 return id;
195 } 195 }
196 196
197 void PpapiThread::Unregister(uint32 plugin_dispatcher_id) { 197 void PpapiThread::Unregister(uint32 plugin_dispatcher_id) {
198 plugin_dispatchers_.erase(plugin_dispatcher_id); 198 plugin_dispatchers_.erase(plugin_dispatcher_id);
199 } 199 }
200 200
201 void PpapiThread::OnLoadPlugin(const base::FilePath& path, 201 void PpapiThread::OnLoadPlugin(const base::FilePath& path,
202 const ppapi::PpapiPermissions& permissions) { 202 const ppapi::PpapiPermissions& permissions,
203 bool supports_dev_channel) {
203 // In case of crashes, the crash dump doesn't indicate which plugin 204 // In case of crashes, the crash dump doesn't indicate which plugin
204 // it came from. 205 // it came from.
205 base::debug::SetCrashKeyValue("ppapi_path", path.MaybeAsASCII()); 206 base::debug::SetCrashKeyValue("ppapi_path", path.MaybeAsASCII());
206 207
207 SavePluginName(path); 208 SavePluginName(path);
208 209
209 // This must be set before calling into the plugin so it can get the 210 // This must be set before calling into the plugin so it can get the
210 // interfaces it has permission for. 211 // interfaces it has permission for.
211 ppapi::proxy::InterfaceList::SetProcessGlobalPermissions(permissions); 212 ppapi::proxy::InterfaceList::SetProcessGlobalPermissions(permissions);
213 ppapi::proxy::InterfaceList::SetSupportsDevChannel(supports_dev_channel);
212 permissions_ = permissions; 214 permissions_ = permissions;
213 215
214 // Trusted Pepper plugins may be "internal", i.e. built-in to the browser 216 // Trusted Pepper plugins may be "internal", i.e. built-in to the browser
215 // binary. If we're being asked to load such a plugin (e.g. the Chromoting 217 // binary. If we're being asked to load such a plugin (e.g. the Chromoting
216 // client) then fetch the entry points from the embedder, rather than a DLL. 218 // client) then fetch the entry points from the embedder, rather than a DLL.
217 std::vector<PepperPluginInfo> plugins; 219 std::vector<PepperPluginInfo> plugins;
218 GetContentClient()->AddPepperPlugins(&plugins); 220 GetContentClient()->AddPepperPlugins(&plugins);
219 for (size_t i = 0; i < plugins.size(); ++i) { 221 for (size_t i = 0; i < plugins.size(); ++i) {
220 if (plugins[i].is_internal && plugins[i].path == path) { 222 if (plugins[i].is_internal && plugins[i].path == path) {
221 // An internal plugin is being loaded, so fetch the entry points. 223 // An internal plugin is being loaded, so fetch the entry points.
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 histogram_name.str(), 467 histogram_name.str(),
466 1, 468 1,
467 LOAD_RESULT_MAX, 469 LOAD_RESULT_MAX,
468 LOAD_RESULT_MAX + 1, 470 LOAD_RESULT_MAX + 1,
469 base::HistogramBase::kUmaTargetedHistogramFlag); 471 base::HistogramBase::kUmaTargetedHistogramFlag);
470 472
471 histogram->Add(result); 473 histogram->Add(result);
472 } 474 }
473 475
474 } // namespace content 476 } // namespace content
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.h ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698